@@ -0,0 +1,517 @@
+from email.mime.text import MIMEText%0Afrom smtplib import SMTP%0Aimport logging%0A%0A%0A#from settings import EMAIL_FROM, EMAIL_MSG, EMAIL_TO, SERVER%0AEMAIL_FROM = 'me@example.com'%0AEMAIL_MSG = 'Hi friend!'%0AEMAIL_SUBJECT = 'Hi'%0AEMAIL_TO = 'friend@example.com'%0ASERVER = 'smtp.example.com'%0A%0A%0Aif __name__ == '__main__':%0A%09msg = MIMEText(EMAIL_MSG)%0A%09msg%5B'Subject'%5D = EMAIL_SUBJECT%0A%09msg%5B'From'%5D = EMAIL_FROM%0A%09msg%5B'To'%5D = EMAIL_TO%0A%0A%09with SMTP(SERVER) as smtp:%0A%09%09#smtp.sendmail(EMAIL_FROM, EMAIL_TO, EMAIL_MSG)%0A%09%09smtp.send_message(msg)%0A

Add send email using SMTP example