Skip to content

technobyte-nitkkr/Publicity-Mailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Participation Mailing Project

This project streamlines the process of sending mass emails to students using official roll sheets and a customizable mailer. It consists of two main components:

  • Roll Sheet Email Address Generator (in RollSheets/)
  • Mass Mailer Service (in mailer/)

Follow the steps below to generate email addresses and send emails efficiently.


1️⃣ Generate Email Address CSV (RollSheets)

  1. Download Roll Sheet PDF

    • Get the official roll sheet PDF for your target year/semester from the NIT KKR website.
  2. Extract Roll Numbers

    • The PDF is multi-paged. Manually extract roll numbers:
      • Screenshot each page.
      • Use a Large Language Model (LLM) like GPT or Gemini to parse screenshots and list roll numbers.
    • Save all roll numbers in a CSV file (one per line or column).

    Future: Scripts may automate PDF parsing and roll number extraction using Gemini SDK.

  3. Generate Email Addresses

    • Open RollSheets/index.ipynb in Jupyter Notebook or VS Code.
    • Set the input and output CSV filenames in the first code cell.
    • Run all cells:
      • Reads roll numbers from your input CSV.
      • Appends @nitkkr.ac.in to each roll number.
      • Saves email addresses to a new output CSV file.
  4. Result

    • The output CSV contains all student email addresses, ready for mailing.

2️⃣ Send Mass Emails (mailer)

  1. Install Dependencies

    npm install
  2. Setup Environment Variables

    cp .env.template .env
    # Edit .env with your Gmail credentials
    • Set up a Gmail App Password (see below).
  3. Prepare Your Email List

    • Use the CSV generated in Step 1 (emails in the first column).
    • Update the path in mailer/index.js if needed.
  4. Run the Mailer

    # Test run (no emails sent)
    node index.js --dry-run
    
    # Send emails
    node index.js

Gmail App Password Setup

  1. Go to Google Account Settings
  2. Enable 2-Step Verification
  3. Create an App Password for "Mail"
  4. Copy the password to your .env file

Customization

  • All settings and content are in mailer/index.js:
    • Subject, sender, HTML template, CSS, attachments, batch size, delays, etc.

Command Line Options

node index.js --help              # Show help
node index.js --config            # Show current configuration
node index.js --dry-run           # Test without sending emails
node index.js --batch-size 5      # Set batch size to 5
node index.js --max-batches 3     # Send only 3 batches

📁 Project Structure

Publicity Mailing/
├── mailer/           # Node.js mass mailer
│   ├── index.js
│   ├── package.json
│   ├── .env.template
│   ├── .env
│   └── Content/
├── RollSheets/       # Roll sheet email generator
│   ├── index.ipynb
│   ├── *.csv
│   └── README.md
└── README.md         # (This file)

🔧 Troubleshooting & Tips

  • Start with a small test batch using dry run mode.
  • Use Gmail App Passwords, not regular passwords.
  • Monitor Gmail sending limits and adjust batch/delay settings.
  • Never commit .env to version control.
  • Keep your email list secure.

🛡️ Security

  • Use app passwords and enable 2-Step Verification.
  • Regularly rotate your app passwords.
  • Protect your email lists and credentials.

📄 License

MIT License


🆘 Support

  • Check the README files in RollSheets/ and mailer/ for details.
  • Review error messages and test with dry run mode.
  • Verify Gmail app password setup if you encounter authentication issues.

About

A Mailer for Internal Publicity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors