📅  最后修改于: 2022-03-11 14:46:12.830000             🧑  作者: Mango
from mailer import Mailer
from mailer import Message
message = Message(From="me@example.com",
To="you@example.com",
charset="utf-8")
message.Subject = "An HTML Email"
message.Html = """This email uses HTML!"""
message.Body = """This is alternate text."""
sender = Mailer('smtp.example.com')
sender.send(message)