Re: Sending out mass mail without having timeout problems ..
| From: | Kevin Stone | Date: | Fri, 14 Dec 2001 18:12:39 +0000 |
| Subject: | Re: Sending out mass mail without having timeout problems .. | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77767@lists.php.net to get a copy of this message | ||
You might try something like this. First estimate the number of emails that
you can send out in 30 seconds (or however long the timeout is). Hard code
that value into your script. Use the location header method to redirect the
script back to its self sending along a new variable $row in the GET string.
This var refers to the next start row in your database.
header("location:http://www.mydomain.com/myscript.php?row=$row").
Include
an if() statement somewhere in there to break from the loop when you've
reached the end of your database. Doable?
-Kevin Stone
> On Thu, 2001-12-13 at 23:13, jimtronic wrote:
> >
> > Wouldn't it be easier (better) to create a sendmail alias include
> > file that has all the addresses in it and let sendmail or majordomo
> > or qmail or whatever handle it?
> >
> > I'm not knocking your method as much as I'm looking for the pros and
> > cons of the different methods.
>
> You missed the actual question :)
>
> I have to do variable replacing in the message to customize it per
> client in the database :)
>
> so I step through the result set and send per result.
>
> the problem is I want to get around the max_timeout limit on script
> execution as this gets in the way if the list gets very big .. and I
> don't want to up the limit for all php scripts being used on the site ..
>
> HEnti
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>