Developed for a user to send out many emails from a designated Gmail account, with the same body but with a few details changed to personalize it for each recipient.
How It Works:
Running pythonGmailEmailer.py will attempt to attach genericPDF.pdf and genericIMAGE.jpg. pythonGmailEmailer.py will read line by line from genericPersonalization.txt and split each line into 3 indices, the first 2 will be substituted into the email message, the third index from a line will be the intended recipient. pythonGmailEmailer.py will read genericMessage.txt and insert the text from that file into the body of the email.
Contents:
genericIMAGE.jpg
genericMessage.txt
genericPDF.pdf
genericPersonalization.txt
pythonGmailEmailer.py
Directions:
Place all files into the same directory.
Under account settings in Gmail, Sign-in & Security set Allow less secure apps: ON.
Edit pythonGmailEmailer.py variables gmail_user and gmail_pwd to be the user name and password to login.
Run $python pythonGmailEmailer.py.