I just encountered the same problem...
I made a MySQL table with an email_id, email, and sentdate field.
while(true)
{
set_time_limit(10); //Give script 10 more seconds to run
SELECT email_id, email FROM thelist WHERE sentdate=0 LIMIT 1
if record not found, then break;
then I use the mail function to send it
UPDATE thelist SET sentdate=UNIX_TIMESTAMP() WHERE email_id=$email_id
then I use the sleep() or usleep() function to wait a second or so (so I
do not use too much bandwidth)
}
-Jason Garber
IonZoft.com
At 07:26 AM 11/2/2001 -0600, Rick Emery wrote:
>Ooooops....we've just armed a potential spammer...
>
>-----Original Message-----
>From: Russ Michell [mailto:[EMAIL PROTECTED]]
>Sent: Friday, November 02, 2001 6:20 AM
>To: Cami
>Cc: PHP DB list
>Subject: Re: [PHP-DB] sending bulk emails
>
>
> > Does anybody know how to send bulk emails using php?
>Don't do it!!
>
>But of you must - I guess you could build an array containing email
>addresses, names, etc - taken
>from form input or a database or whatever and then loop the arrays mailing
>people...
>
>$mail = "mail(";
>for($i=0; $i<$email_array_name;$i++( {
> $mail .= "$values,";
> }
>$mail .= "\"$subject\",\"$body\",\"From: $from\");";
>
>Something like that anyway (that's just off the top of my head)
>Regards.
>
>Russ
>
>On Fri, 2 Nov 2001 11:26:22 -0000 Cami <[EMAIL PROTECTED]> wrote:
>
> > Hi guys,
> > Does anybody know how to send bulk emails using php?
> > Thanks,
> > Cami
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>#-------------------------------------------------------#
>
> "Believe nothing - consider everything"
>
> Russ Michell
> Anglia Polytechnic University Webteam
> Room 1C 'The Eastings' East Road, Cambridge
>
> e: [EMAIL PROTECTED]
> w: www.apu.ac.uk/webteam
>
> www.theruss.com
>
>#-------------------------------------------------------#
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]