Send mails to masses by rendering Text files and HTML templates.
-
Create a CSV file, say
mails.csv
consisting a column,Email
, spelled as it is, and add the list of all the receiver's email to be sent in that column.Email abc@gmail.com pqr.we@outlook.com xyz@yahoo.com
-
Create a Template that you want to send to the receivers. This can be:
-
Enable Less Secured Apps from your google account, click here
- This needs to be enabled as Python needs to login to your email account which requires permissions from your google account.
-
Disable it once your mails are sent.
-
Install all the requirements in the requirements.txt file
pip install -r requirements.txt
-
Provide valid credentials using a simple command
python mass_email_sender.py register -id "Your-Email-Id" -pwd "Corresponding-Mail-Password"
such as:
python mass_email_sender.py register -id abc@gmail.com -pwd abc1234
python mass_email_sender.py send -sub "Type the subject here" -text "Path-to-Text-File" -path "Path-to-CSV-File"
such as:
python mass_email_sender.py send -sub "Letter of Recommendation" -text templates/sample.txt -path mails.csv
python mass_email_sender.py send -sub "Type the subject here" -text "Path-to-HTML-File" -path "Path-to-CSV-File"
such as:
python mass_email_sender.py send -sub "Letter of Recommendation" -text templates/sample.html -path mails.csv