SMTP
Peter Hansen
peter at engcorp.com
Thu Aug 16 21:41:52 EDT 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