@@ -0,0 +1,797 @@
+import smtplib, os%0A%0A#Getting data , Function can also be used%0Auser = 'srm.news.notifier@gmail.com'%0Apwd = 'notifier.gmail'%0Arecipient = 'srm.news.notifier@gmail.com'%0Asubject = 'Test'%0Abody = 'testing via SMTP'%0A%0A%0Agmail_user = user%0Agmail_pwd = pwd%0AFROM = user%0ATO = recipient if type(recipient) is list else %5Brecipient%5D%0ASUBJECT = subject%0ATEXT = body%0A%0A# Prepare actual message%0Amessage = %22%22%22%5CFrom: %25s%5CnTo: %25s%5CnSubject: %25s%5Cn%5Cn%25s%0A%22%22%22 %25 (FROM, %22, %22.join(TO), SUBJECT, TEXT)%0Atry:%0A            server = smtplib.SMTP(%22smtp.gmail.com%22, 587)%0A            server.ehlo()%0A            server.starttls()%0A            server.login(gmail_user, gmail_pwd)%0A            server.sendmail(FROM, TO, message)%0A            server.quit()%0A            print 'successfully sent the mail'%0Aexcept:%0A            print %22failed to send mail%22%0A

Create sendmail_SMTP.py