RE: [PHP] bulk mail()
| From: | Jeff Field | Date: | Fri, 14 Jun 2002 19:12:45 +0000 |
| Subject: | RE: [PHP] bulk mail() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102259@lists.php.net to get a copy of this message | ||
I've been doing the following sending personalized mail to 600+ recipients,
so far without any signs of discomfort anywhere:
set_time_limit($total_rows * 1); // up the script timeout 1 second per
email
BTW, I use qmail; not sendmail. As I've never used sendmail, I don't know
if this is part of your problem or not. I'm guessing a bit, but based on
600+ emails, I'd say that the script itself takes about 10-15 seconds; the
mail to be delivered takes a bit longer, perhaps another minute or two.
Jeff
> -----Original Message-----
> From: Justin French [mailto:justin@indent.com.au]
> Sent: Wednesday, June 12, 2002 6:45 AM
> To: php
> Subject: [PHP] bulk mail()
>
>
> Hi all,
>
> I've got a mailing on a website, with email address' / names / etc in a
> MySQL table.
>
> I think there's around 120 on it at the moment.
>
> I've been noticing a growing lag on the sending of mail though...
> I've got a
> script which takes a message from a form, then runs a while loop
> through the
> rows of the mailing_list table, replacing a special string with the
> subscribers name, and sending using the mail() command.
>
> However, this time, the script actually failed, with a "failure when
> attempting to access blah.com/foo.php" (the sending script). I
> have no idea
> if SOME people got the email, or what, and have no idea how to check.
>
> So, I make the assumption that as the mailing list has grown, the script
> time has slowed... now it's too big (or the server was too busy)
> to process
> all the emails before the script timed out.
>
>
> If I didn't want to personalise the emails, I'm sure the script
> would run a
> lot quicker with every address in the Bcc header, but since we personalise
> each email, I can't see any option other than using mail() 200
> times... and
> it's only going to get a lot worse as we climb to 1000+.
>
> So, what options do I have?
>
> Break the mailing list up into batches of 40 or so? How would I implement
> something like this?
>
>
> Any advice / concepts / ideas welcome!
>
>
> Justin French
> --------------------
> Creative Director
> http://Indent.com.au
> --------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>