smtplib.py how to ?
Colm Rafferty
cgr at formulae.co.uk
Fri Nov 5 20:02:44 EST 1999
Dear all,
I cannot insert text into the headers To: From: CC: etc, of the email
The script below ( the sample in the smtplib.py module) only sends all
the text in the body of the email.
How do I insert text in the headers?
----------------------------------------
import smtplib
s=smtplib.SMTP("localhost")
tolist=["cgr at formulae.co.uk","c.rafferty at virgin.net","cgr at pangea.co.uk"]
msg = '''
From: test at my.org
Subject: testin'...
This is a first test '''
s.sendmail("me at mydomain.co.uk",tolist,msg)
s.quit()
----------------------------------------
Thanks for any help
Colm Rafferty
More information about the Python-list
mailing list