SMTP

Peter Hansen peter at engcorp.com
Fri Aug 17 03:41:52 CEST 2001


Sophie Coon wrote:
> 
> That is how I do it :
> subject  = "My subject"
> body = "My message"
> msg = "Subject:"+subject+"\n"+body
> server = smtplib.SMTP('localhost')
> server.sendmail(fromaddress, toaddress, msg)
> server.quit()

You likely need an additional "\n" between the last 
header line and the first line of the body.

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list