Newsletter

hi.
I'm trying to write a newsletter script but the server times out.

I'm getting all email address fields from an sql table, putting it into a
string, then emailing the string.
Would it be better to email one address, then get the next?

Cheers,

--
Neil Trigger
http://www.matrix23.co.uk
Neil Trigger [ Do, 30 November 2006 14:37 ] [ ID #1553077 ]

Re: Newsletter

Neil Trigger schreef:
> hi.
> I'm trying to write a newsletter script but the server times out.
>
> I'm getting all email address fields from an sql table, putting it into a
> string, then emailing the string.
> Would it be better to email one address, then get the next?
>
> Cheers,
>
> --
> Neil Trigger
> http://www.matrix23.co.uk
>
>

Put al your email adsresses in an array

$first = time();
$second = $first + 1;
foreach ($arry as $value) {
mail($value,.....)
while (($second - $first) <= 2) {
$second=time();
}
$first = $second;
}

That will send every 2 seconds a mail. If you mail too fast, it's
possible that de mailserver will drop your mails.


--
Essetee ---- Roeselare ---- Belgium
http://www.essetee.be
ICQ : 763290 -- Jabber : essetee [at] jabber.org
Serge Terryn [ Do, 30 November 2006 14:49 ] [ ID #1553078 ]

Re: Newsletter

Lovey - thanks.

--
Neil Trigger
http://www.matrix23.co.uk
"Serge Terryn" <serge [at] essetee.be> wrote in message
news:UjBbh.212113$qH3.3287087 [at] phobos.telenet-ops.be...
> Neil Trigger schreef:
> > hi.
> > I'm trying to write a newsletter script but the server times out.
> >
> > I'm getting all email address fields from an sql table, putting it into
a
> > string, then emailing the string.
> > Would it be better to email one address, then get the next?
> >
> > Cheers,
> >
> > --
> > Neil Trigger
> > http://www.matrix23.co.uk
> >
> >
>
> Put al your email adsresses in an array
>
> $first = time();
> $second = $first + 1;
> foreach ($arry as $value) {
> mail($value,.....)
> while (($second - $first) <= 2) {
> $second=time();
> }
> $first = $second;
> }
>
> That will send every 2 seconds a mail. If you mail too fast, it's
> possible that de mailserver will drop your mails.
>
>
> --
> Essetee ---- Roeselare ---- Belgium
> http://www.essetee.be
> ICQ : 763290 -- Jabber : essetee [at] jabber.org
Neil Trigger [ Sa, 02 Dezember 2006 01:31 ] [ ID #1555248 ]
PHP » alt.php.sql » Newsletter

Vorheriges Thema: Check Please.
Nächstes Thema: connection MySQL and ms Access