- Send personalized emails to a list of recipients from a CSV file.
- Use template files with dynamic variables (e.g.,
{name}). - Supports Gmail and custom SMTP servers.
- Interactive menu or command-line mode selection.
- Handles HTML and plain text emails.
- Python 3.8 or newer
- pip (Python package manager)
- Clone the repository:
git clone https://github.com/Sohan-Rout/BulkEmailGenrator.git cd BulkEmailGenrator - Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
- Copy the example environment file and edit it:
cp .env.example .env
- Open
.envand set your email credentials and SMTP settings.
- Copy the example environment file and edit it:
You can run the script in interactive menu mode or specify a mode via command line:
Interactive menu:
python3 main.pyDirect mode (e.g., Emails):
python3 main.py --mode Emailsemail,name
sohan@example.com,Sohan
neshka@example.com,Neshka
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f9f9f9;
color: #222;
}
.container {
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.07);
margin: 40px auto;
max-width: 480px;
padding: 32px;
}
h2 {
color: #2a7ae2;
}
</style>
</head>
<body>
<div class="container">
<h2>Hello $name,</h2>
<p>
Welcome, We're glad to have you on board!
</p>
</div>
</body>
</html>- SSL Issues: By default, the script will fall back to an unverified SSL context if SSL certificate verification fails, so you generally do not need to manually fix SSL issues.
- Gmail Users: If using Gmail, you need to generate an App Password and use it in your
.envfile. Regular account passwords will not work with "Less secure app access" disabled.
MIT License (see LICENSE file for details).
