Re: VS: Emailing a DataBase

From: Date: Tue, 10 Oct 2000 18:12:46 +0000
Subject: Re: VS: Emailing a DataBase
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3489@lists.php.net to get a copy of this message
> Hey! I`m using the mail command to send out short newsletters to over 400 > subsrcibers each day. > Problem is that the page times out, waiting for all the mails to be sent. Is > there someway I can avvoid this?? > - or does this mean that the mail command doesnt complete its > delivery? There are a few solutions that come to mind: 1) PHP script sends a single message to a mailing list address. Pro: page returns almost immediately Con: you can't personalize the message (e.g. "This message was sent to $email\nTo unsubscribe, click here: $url\n") unless your mailing list package offers this functionality 2) Reset the time limit to 0 in your page Pro: by far the easiest to implement Con: Doesn't solve the problem with delays 3) Use a fast local mail server (e.g. qmail) Pro: page returns quickly (a good MTA can easily queue thousands of messages a second on modern hardware), you can still customize them, and a sophisticated MTA can batch messages for various ISPs (e.g. instead of connecting to aol.com's mailserver 500 times, it connects once and sends all of the pending messages) Con: Setting up a new mail server is non-trivial In your case, given the very low message volumes, it would probably be easiest to add a set_time_limit(0) call to your page. If that's not possible, you probably want to investigate approach #1.

« previous php.db (#3489) next »