On Mon, Jun 7, 2010 at 3:40 PM, Lyle <[email protected]> wrote:

>  On 11/03/2010 10:29, Robin Edwards wrote:
>
>  Hi Max,
>   Luckily this particular client is on my server, so there are lots of
> options. Although ideally I'd like something that's easily portable.
>
>
>  I am guessing by this you mean shared hosting? Its a bit of a hack but maybe:
>
> An asynchronous request pulling batches of emails from a queue in the
> database and sending them.
>
> After each batch is complete update a progress bar so the user isn't
> just left waiting.
>
> Does that make sense?
>
>
>
> I ended up with something like this, with JQuery repeatedly calling the
> script via AJAX and generating a progress bar.
>
>  But yes it would be a lot nicer to have some kind of job system style
> daemon thing.
>
>
>
> It shouldn't be to hard to upgrade what I've done to something like this.
> Marks suggestion of TheSchwartz looks like it would be ideal.
>
>
20,000 emails sounds excessive.  When I've done this kind of thing for
hundreds of emails I forked a job in the background to do it, close
STDIN/STDOUT and it works fine.  I think I made the pid of the forked
process available some how and this was used in another CGI that was used to
check progress.

Make the background job log what it is doing to a database, including the ID
of the messages as they are sent.  The progress checking CGI can then use
this to see what is going on.

Then implement a procmail (or similar) filter to catch the bounces and
update the database email table accordingly.  If you have recorded the IDs
then this is fairly easy  Then you can see the dud addresses in your list of
20,000

Sending 20,000 emails is likely to take some time. It's the bad addresses
that gum everything up.

The system I implemented was for medical alerts so it was kinda important to
know who had got the message and who hadn't.  But even if you are just
telling people about the latest advances in dog food knowing what addresses
do not work is a good idea as it is these addresses that slow up the rest of
the system.
_______________________________________________
BristolBathPM mailing list
[email protected]
http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm

Reply via email to