from mailer_jinja2.mail import Mail
from smtplib import SMTP
from_address = 'sender@mail.com'
password = 'test1234'
to_address = 'receiver@mail.com
server = SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()
server.login(from_address, password)
mail = Mail(from_address=from_address,
to_address=to_address,
subject='Test mail',
template='test.html',
server=server,
fname='theo',
sname='erik'
)
mail.send_message()
-
Notifications
You must be signed in to change notification settings - Fork 0
theobouwman/mailer-jinja2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A Python mailer with Jinja2 templating support
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published