A simple Python project to send personalized HTML emails using Gmail's SMTP server.
- Loads HTML email template from
index.html - Personalizes content using Python's
string.Template - Sends email via Gmail
- Update the following fields in
main.py:email['to']smtp.login('<your email address>', '<your password>')
- Run the script:
python main.py
- Python 3.8+
- Gmail account (with app password or "less secure apps" enabled)
main.py— Main scriptindex.html— Email templatepyproject.tomlandpoetry.lock— Dependency management (Poetry)
Never share your email password publicly. Use environment variables or app passwords for better