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.
-
Download Roll Sheet PDF
- Get the official roll sheet PDF for your target year/semester from the NIT KKR website.
-
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.
- The PDF is multi-paged. Manually extract roll numbers:
-
Generate Email Addresses
- Open
RollSheets/index.ipynbin 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.into each roll number. - Saves email addresses to a new output CSV file.
- Open
-
Result
- The output CSV contains all student email addresses, ready for mailing.
-
Install Dependencies
npm install
-
Setup Environment Variables
cp .env.template .env # Edit .env with your Gmail credentials- Set up a Gmail App Password (see below).
-
Prepare Your Email List
- Use the CSV generated in Step 1 (emails in the first column).
- Update the path in
mailer/index.jsif needed.
-
Run the Mailer
# Test run (no emails sent) node index.js --dry-run # Send emails node index.js
- Go to Google Account Settings
- Enable 2-Step Verification
- Create an App Password for "Mail"
- Copy the password to your
.envfile
- All settings and content are in
mailer/index.js:- Subject, sender, HTML template, CSS, attachments, batch size, delays, etc.
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 batchesPublicity 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)
- 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
.envto version control. - Keep your email list secure.
- Use app passwords and enable 2-Step Verification.
- Regularly rotate your app passwords.
- Protect your email lists and credentials.
MIT License
- Check the README files in
RollSheets/andmailer/for details. - Review error messages and test with dry run mode.
- Verify Gmail app password setup if you encounter authentication issues.