auto.email is a Command-line based tool to send batches of emails with some attachments, attachments can be the same for all or different for each email, it's on you!
-
Keep your email id and secret app code in the
security/security.txt
file -
Save Email content to
body.txt
, changeconfig.txt
according to you, and add the receiver's info inemail_data.csv
-
Keep all attachments in the data folder with the name same as a receiver (CASE SENSITIVE)
-
Run the below command if there is no error emails will be sent or you will get a prompt for confirmation
poetry run python Runner.py
-
Script will print the time taken at the end, and will generate 2 logs files,
logs.csv
andScriptlogs.txt
.
-
You will need to install Python 3.11 and then install Poetry
-
clone this github repo
git clone https://github.com/Niraj-kumbhar/Email_Automation.git
OR you can download this using GUI and then extract the downloaded zip file.
-
Go to Command-line and change directory location to email_automation folder, and run the below command so poetry will take care of adding dependencies
poetry install
-
It's all good to go now!
- Should have Gmail id with 2-step authentication enabled.
- Generate App password for a custom app, copy and save password
- for more information, use this documentation
Note: It is important that you have to enable 2-step authentication and use the App password as the password for the script, as Google policy has changed to improve security