Hi

If he's going to do it, it should at least be done safely...


- have a status field in your database table (unsent/sent/error)

- update the status field after _every_ email you send.

- do NOT do this in a transaction (otherwise if something dies everything is 
forgotten)

- if the update status query fails, do everything possible to avoid carrying 
on (important if the sending job is in crontab) - this can even be things 
like renaming the database table, deleting itself, anything to make sure it 
doesnt screw up and send any emails that it shouldnt

- dont send too fast.  1000-2000 per hour is good.

- be VERY VERY VERY careful that all the recipients have GIVEN PERMISSION for 
you to email them.  Its not worth the hassle of annoying people or risking 
getting your mail hub blacklisted.


General philosophy: sending too few mails or missing out the odd recipient 
doesnt matter, but NEVER send too many or any duplicates to any person.


Just my 2c

Shane


On Friday 02 November 2001 1:40 pm, Rick Emery wrote:
> <GRIN>
> True...so very true...
>
> A little knowledge is a dangerous thing.  In the hands of a spammer...a
> deadly thing...
> </GRIN>
>
> -----Original Message-----
> From: Russ Michell [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 7:34 AM
> To: Rick Emery
> Cc: PHP DB list
> Subject: Re: RE: [PHP-DB] sending bulk emails
>
>
> Hmmm this is true - but as someone once wrote on this list:
>
> "If someone want's to build a car with 4 reverse gears, we can tell them
> it's not a very good idea,
> but we can also show them how to do it."
>
> Granted though - spam is a little different than cars!
> Cheers.
>
> Russ
>
> On Fri, 2 Nov 2001 07:26:15 -0600  Rick Emery <[EMAIL PROTECTED]> 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]
>
> #-------------------------------------------------------#
>
>   "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
>
> #-------------------------------------------------------#

-- 
Shane

-- 
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]

Reply via email to