Mass Emailer

Peter Hansen peter at
Mon Feb 3 14:33:33 CET 2003

Metnetsky wrote:
> I have about 3000 emails stored in a database which I would like to retrieve
> and then send out.  As I'm new to Python I'm not sure of the best way to
> perform this function without bogging down everything (python, smtp, etec).
> The following two ways have come to mind, please let me know which you all
> think would be best.  Naturally a mysterious third option is definitely
> welcome.
> Option #1:
>         Connect to the database, pull the records, and then disconnect from
>         the database.  Go through each record and send emails one-by-one to each
>         user in the system.  This sounds like a HUGE bog on the system, but I
>         could be wrong.
> Option #2
>         Same as above except sending each email with 20 (or more) user addresses.
>         This would cut down the bog I expect by an estimated 20% at least.
> Suggestions, ideas, comments, complains....all are welcome

Install a real mail server like Qmail locally, then just blast all the 
messages at it and let it worry about "bog".  Those programs are designed
for this kind of thing, as well as handling retries, etc.


More information about the Python-list mailing list