Question about smtplib, and mail servers in general.

Tim Williams (gmail) tdwdotnet at gmail.com
Tue Sep 20 08:29:22 EDT 2005


On 20/09/05, Daniel Dittmar <daniel.dittmar at sap.corp> wrote:
> Chris Dewin wrote:
> > Hi. I've been thinking about using smtplib to run a mailing list from my website.
> >
> > s = smtplib.SMTP("server")
> > s.sendmail(fromaddress, toaddresess, msg)

> >
> 
> Not really an answer to your question, but it's probably considered bad
> style to publish the email addresses of the recipients via the address
> list. Use a neutral To-address (best: the mailing list address) and add
> the recipients via bcc: headers.
> 

For clarity

The toaddreses don't show in the email,  they are the envelope TO:
addreses.   The addresses in the email's TO: Headers are shown to the
recipient and these are the ones that should be "disguised" as best
practice for mailing lists.

The email module's replace_header('to', 'new-text) will do the job for you.



More information about the Python-list mailing list