I have posted python script for e-mail sending in python project code is given below.
import smtplib
sender = 'from@findnerd.com'
receivers = ['to@todomain.com']
message = """From: From Person
To: To Person
Subject: SMTP e-mail test
This is a test e-mail message.
"""
try:
smtpObj = smtplib.SMTP('localhost')
smtpObj.sendmail(sender, receivers, message)
print "Successfully sent email"
except SMTPException:
print "Error: unable to send email"
0 Comment(s)