Skip to content

Repository files navigation

CTI Recruitment 2025 - Interview Email Sender

This package contains two Python scripts to send interview invitation emails to candidates.

Files Included

  1. send_individual_interviews.py - Sends personalized emails to each candidate individually
  2. send_bulk_interview_email.py - Sends a single email with all candidates in BCC
  3. candidates_sample.csv - Sample CSV file format

Prerequisites

  • Python 3.6 or higher
  • Gmail account with 2-factor authentication enabled
  • Gmail App Password (see setup instructions below)

Gmail App Password Setup

  1. Go to your Google Account settings (https://myaccount.google.com/)
  2. Navigate to Security
  3. Enable 2-Step Verification if not already enabled
  4. Go to Security > App passwords
  5. Select Mail as the app and Other as the device
  6. Click Generate
  7. Copy the 16-character password (remove spaces)
  8. Update the SENDER_PASSWORD in the script

CSV File Format

Your CSV file should have the following columns (header row required):

name,cnic,subject,email
Ahmad Khan,12345-1234567-1,Mathematics,ahmad.khan@example.com
Fatima Ali,23456-2345678-2,Physics,fatima.ali@example.com

Columns:

  • name - Full name of the candidate
  • cnic - CNIC number (not used in email, for your records)
  • subject - Subject/Position (not used in email, for your records)
  • email - Email address of the candidate

Configuration

Before running either script, update the following constants at the top of the file:

Interview Details

INTERVIEW_DATE = "05-10-2025 to 07-10-2025"
INTERVIEW_TIME = "09:00 AM - 04:00 PM"
COLLEGE_NAME = "Your College Name"

Email Configuration

SENDER_EMAIL = "your_email@gmail.com"
SENDER_PASSWORD = "your_16_char_app_password"
SENDER_NAME = "Your Name"
SENDER_DESIGNATION = "Your Designation"

File Path

CSV_FILE_PATH = "candidates.csv"

Usage

Option 1: Individual Emails (Recommended for personalization)

This script sends a personalized email to each candidate with their name.

python send_individual_interviews.py

Features:

  • Personalized greeting with candidate's name
  • 2-second delay between emails (configurable)
  • Progress tracking
  • Summary report at the end

Pros:

  • More personal
  • Better tracking of which emails failed

Cons:

  • Takes longer (2 seconds × number of candidates)
  • More API calls

Option 2: Bulk Email with BCC

This script sends a single email with all candidates in BCC.

python send_bulk_interview_email.py

Features:

  • Single email sent to all candidates
  • Candidates can't see each other's emails (BCC)
  • Automatically splits into batches of 100 if needed
  • Much faster than individual emails

Pros:

  • Very fast
  • Less API calls
  • Good for large groups

Cons:

  • Generic greeting ("Dear Applicant")
  • No tracking of individual deliveries

Email Sending Limits

Gmail has the following limits:

  • Free Gmail: 500 emails per day
  • Google Workspace: 2,000 emails per day

Recommendations:

  • For 400-500 candidates: Use the bulk email script (BCC method)
  • For < 100 candidates: Either method works fine
  • For personalization: Use individual emails script

Safety Features

Both scripts include:

  • Email validation
  • User confirmation before sending
  • Error handling for authentication and network issues
  • Delay between emails (individual script only)
  • Batch processing for large recipient lists (bulk script)

Troubleshooting

Authentication Failed

  • Verify you're using an App Password, not your regular Gmail password
  • Make sure 2-factor authentication is enabled
  • Check that the email and password are correct

Emails Going to Spam

  • Make sure your Gmail account has a good sending reputation
  • Don't send too many emails at once (use the built-in delays)
  • Consider using bulk email for large groups
  • Recipients should add your email to their contacts

CSV File Not Found

  • Make sure the CSV file is in the same directory as the script
  • Update CSV_FILE_PATH with the correct path
  • Check the file name spelling

Example Output

Individual Emails Script

==============================================================
CTI RECRUITMENT 2025 - Interview Invitation Email Sender
==============================================================

Reading candidates from: candidates.csv
Found 5 candidates

Interview Details:
   Date: 05-10-2025 to 07-10-2025
   Time: 09:00 AM - 04:00 PM
   Venue: Your College Name

Sender: Principal <your_email@gmail.com>
Delay between emails: 2 seconds

Do you want to proceed with sending emails? (yes/no): yes

==============================================================
Starting email sending process...
==============================================================

[1/5] Sending to: Ahmad Khan (ahmad.khan@example.com)
   ✓ Email sent successfully

[2/5] Sending to: Fatima Ali (fatima.ali@example.com)
   ✓ Email sent successfully

...

==============================================================
EMAIL SENDING SUMMARY
==============================================================
Total candidates: 5
Successfully sent: 5
Failed: 0
==============================================================

Support

If you encounter any issues:

  1. Check the error message in the console
  2. Verify your Gmail configuration
  3. Make sure your CSV file format is correct
  4. Check your internet connection

Security Notes

  • Never commit your App Password to version control
  • Keep your credentials secure
  • Use environment variables for production systems
  • Regularly rotate your App Passwords

Created for CTI Recruitment 2025

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages