Send an email : Email « Network « Python






Send an email

 


import smtplib
server = smtplib.SMTP('localhost')
server.sendmail('name@website.org', 'anothername@web.org',
"""To: name@website.org
From: anothername@web.org

Beware the Ides of March.
""")
server.quit()

           
         
  








Related examples in the same category

1.Print out email message from your email box
2.Send email to two receivers
3.Get email message mymailbox.msg file
4.Sending Some E-Mail
5.MIME Multipart Messages
6.Login to POP3 server and retrieve information
7.Sending Mail over an SMTP Connection