Easily customise emails for each recipient. Made for non-programmers.
- Python 3
python send.py config.yaml
You only have to modify three simple parts:
- HTML file for the email body template.
- CSV file for the contact list and their customised values.
- YAML file for your smtp server details and other metadata.
An example of a simple HTML template is:
Hello ${name},
<br><br>
Congratulations! You won a ${medal} medal!
where name
and medal
will be substituted by the values in the csv file.
The CSV file should at least contain the emails of the recipients. You can add other columns for names, age etc.
name,email,medal
alice,[email protected],Gold
bob,[email protected],Silver
The name
and medal
column will be substituted into the HTML placeholder.
Important: Header must contain an email
column.
server:
host: smtp.gmail.com
port: 587
username: [email protected]
password: randompassword
data:
contacts: contacts.csv
template: template.html
email-data:
from: [email protected]
cc: [email protected]
subject: Hello, World!
attachments:
- file1.txt
- file2.txt
- file3.txt
More on host
:
- If you are sending via Gmail, use
smtp.gmail.com
- If you are sending via Office365, use
smtp.office365.com
- If you are sending via Zoho, use
smtp.zoho.com