Showing posts with label mail. Show all posts
Showing posts with label mail. Show all posts

Friday, January 23, 2015

Send mail python

Python send mail



Python has built in libraries for accessing pop imap or smtp:
import smtplib

From = 'test@python.com'

To = ["test@user.com"]

Subject = "Test_mail"

TEXT = "Hai"

message = "Hai"

server = smtplib.SMTP('myserver')
server.sendmail(FROM, TO, message)
server.quit()