from sender import Mail, Message
mail
=
Mail(
"smtp.gmail.com"
,
port
=
465
,
username
=
,
password
=
"yourpassword"
,
use_tls
=
False
,
use_ssl
=
True
,
debug_level
=
False
)
msg
=
Message(
"msg subject"
)
msg.fromaddr
=
(
"Vo Duy Tuan"
,
)
msg.to
=
msg.body
=
"this is a msg plain text body"
msg.html
=
"<b>this is a msg text body</b>"
msg.reply_to
=
msg.charset
=
"utf-8"
msg.extra_headers
=
{}
msg.mail_options
=
[]
msg.rcpt_options
=
[]
# Send message
mail.send(msg)