Sending Some E-Mail : Email « Network « Python






Sending Some E-Mail

 
fromAddress = 'sender@example.com'
toAddress = 'me@my.domain'
msg = "Subject: Hello\n\nThis is the body of the message."

import smtplib
server = smtplib.SMTP("localhost", 25)
server.sendmail(fromAddress, toAddress, msg)

   
  








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.MIME Multipart Messages
5.Send an email
6.Login to POP3 server and retrieve information
7.Sending Mail over an SMTP Connection