Sending bulk email from a Python script

Steve Lamb grey at despair.dmiyu.org
Mon Mar 8 21:35:03 EST 2004


On 2004-03-09, Simon Willison <cs1spw at bath.ac.uk> wrote:
> Our largest list at the moment is 4,000 addresses. The business we are in 
> (local online newspaper) means we are very unlikely to ever have more than 
> 10,000. The answer certainly relates to sendmail, but I'm interested in any 
> 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.

    At the minimum since, AFAIK, Sendmail doesn't do batching on its own you'd
want to sort the list and send out one message per domain by using multiple
RCPT_TO lines.

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
       PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list