How prakhar619/coldcontactxlsx works
Project Type and Purpose
• This is a CLI-driven “automation” tool (Python script) that reads recruiter data from an Excel spreadsheet, generates possible recruiter email addresses, composes personalized cold emails (with optional follow-ups), and sends them in batches according to a schedule.
• There is no user-facing GUI or persistent database; the primary I/O artifacts are spreadsheets, email templates, logs, and the SMTP service.
File Structure
Top-level:
• main.py – orchestrates the workflow.
• .env – holds SMTP credentials, user details, email subject/body variables.
• requirements.txt – Python dependencies (e.g., openpyxl, smtplib).
• readme.md – project overview and instructions.
Directories:
• email_template – contains “email_template.txt” and “follow_up_template.txt”.
• resumes – holds PDF resumes to attach.
• utils
– data_utils
• excel_reader.py – reads and parses the recruiters.xlsx file.
• generate_email_address.py – applies common company email patterns to guess addresses.
– email_utils
• email_manager.py – assembles the email content (templating + attachments).
• email_sender.py – handles SMTP connection, retries, and error handling.
• follow_up.py – tracks sent emails and composes follow-ups for non-responders.
– scheduler
• schedule_now.py – triggers immediate send.
• send_later.py – schedules a future send time (batch/time-based control).
Supporting files:
• recruiters.xlsx – input data.
• logs – records successful sends and errors.
README for Additional Insights
• Features: bulk sending, scheduling, retry logic, follow-ups, attachment support.
• Future TODO: Chrome extension, OpenAI integration—but out of current scope.
Main Components & Interactions
a. Data Input
– recruiters.xlsx (Excel) → data_utils.excel_reader reads rows.
b. Email Address Generation
– data_utils.generate_email_address applies patterns per row.
c. Email Content Assembly
– email_template/*.txt + .env variables + resume attachment → email_utils.email_manager.
d. Sending & Scheduling
– scheduler.schedule_now or send_later determines send timing.
– email_utils.email_sender connects to SMTP (external service) & sends.
e. Follow-Up Logic
– email_utils.follow_up identifies non-responders and re-uses templates.
f. Logging
– successes & failures written to logs/*.txt.
Architectural Patterns & Design Principles
• Modular layering:
– Data Layer (Excel reader, address generator)
– Business Logic (email manager, scheduler, follow-up)
– Infrastructure Layer (SMTP client, retry logic, logging)
• Single responsibility per module, clear separation of concerns.
• CLI orchestration in main.py.