Automated Email Sender is a Python-based application designed to automate the process of sending multiple emails. The application is ideal for sending batch emails, newsletters, and alerts.
- Send emails to multiple recipients with one command.
- Scheduling options for automated email sending.
- Environment variable support for secure password management.
- Detailed logs for tracking email sending activity.
- Python 3.x
- pip
- Virtualenv (optional but recommended)
-
Clone the Repository
git clone https://github.com/YourUsername/automated_email_sender.git
-
Navigate to the Project Directory
cd automated_email_sender
-
Create a Virtual Environment (Optional)
virtualenv venv
-
Activate the Virtual Environment
- On Windows:
.\venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install Required Packages
pip install -r requirements.txt
- Populate
email_data.csv
with recipient email addresses, subjects, and body texts. - Create a
.env
file to store environment variables. (See [Environment Variables])
Create a .env
file in the root directory and add the following variables:
EMAIL_PASSWORD=YourEmailPassword
SENDER_EMAIL=YourSenderEmail
SMTP_SERVER=YourSMTPServer
SMTP_PORT=YourSMTPPort
To run the application:
python main.py
To set up a schedule for automated email sending, modify the email_schedule()
function in email_sender.py
.
The application logs all the email sending activity. You can find the log file at logs/email.log
.
See the tests
folder for testing scripts. To run tests, execute:
python -m unittest discover tests
If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.
Distributed under the MIT License. See LICENSE
for more information.
- Python
- smtplib
- schedule