Sending bulk email from a Python script

Peter van Kampen news at woody.datatailors.com
Tue Mar 9 06:34:46 EST 2004


In article <2004030819064420092%cs1spw at bathacuk>, Simon Willison wrote:

> experience other people may have with this kind of task. At the moment I'm 
> looking at using smtplib and just cycling through calling smtp.send() once 
> for every address but I'm not confident that that this is a particularly 
> efficient method. If there's a better option I'd love to hear about it.

You can try to use BCC's. We send a message to several (I think we settled
for 25) people at once. We only mail a few hundred people at the time (using
php, which uses sendmail) but it's very fast (the mailing is invoked from a
webpage and there seems to be no more than the usual delay which was 'good
enough' to not bother to measure 'real' speed) and seems to work flawlessly.

The drawback is that you cannot test which addresses failed (other than
checking /var/log/mail).

PterK

-- 
Peter van Kampen
pterk -- at -- datatailors.com



More information about the Python-list mailing list