This script is designed to help you send mass mails that are rich in HTML content, with attachments to users.
1.salutation.txt
Enter text to be written before name of sender here.
For example:
Hi Jane Doe,
<!--Here,
'Hi<_space_>'
will be the content in salutation.txt
-->
2.body.txt
Enter whatever follows name of sender (comma, return, body of email and salutation) in HTML format.
For example:
,<br/>
<!--This part of the content contains everything after the salutation-->
<p>
Enter the body in whatever HTML format you wish to.
</p>
<p>
<!--The following portion contains the signature-->
Signature here.
</p>
3.Attachments
Configure attachement path and file name in IMPORTANT CONSTANTS.
IMPORTANT CONSTANTS
Ensure that these are correctly filled.
########################################
# IMPORTANT CONSTANTS
# File with e-mail address of targets
target_csv = 'target.csv'
# Sender E-Mail Address
email_id = '[email protected]'
# Enter your name/organisation name for identification
identification = 'Justice League Inc.'
# Mailing Server
SMTP_server = 'mail.justiceleague.org'
# Mail's Subject
subject = "Resignition Citing Lack of Superpowers"
attachment_path_and_name = "./sample_attachment.jpg"
########################################
Support for a better method will be added soon.
- CSV file format.
- Fields should be exactly similar as in the given
target.csv
.
Example:
S.No, Name, email,
S.No, Name, email,
- Send a mail to yourself first using the script before blasting it on mailing lists.
- If you need any help, create an issue.
- Don't spam. It's unbecoming.
- Post configuration, enter the following with your email account password:
python send_mail.py MAIL_PASSWORD_HERE