Mega Code Archive

 
Categories / Python / Network
 

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)