Reply to Re: Avoiding timeout while mass mailing

Your name:

Reply:


Posted by Roger Dodger on 04/05/06 02:13

Jerry Stuckle wrote:
> Satya wrote:
> > What about writing a script such way that it send like 1000 mail and
> > sleep for 1 sec and start again
> >
>
> sleep() doesn't reset the timeout clock, so this doesn't work. In fact, since
> you're sleeping during part of your total allowed time, you'll get even less done.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================

So I went with the suggestion to use set_time_limit(0) at the top of
the script. That works just fine. I can send 2500 e-mails plus bcc
each one to a separate account in 4-6 minutes. To insure that there is
some record of what has been sent if the program were to crash, I open
a log file before the main loop, and record a success or error message
in the if (! $mail->send() ) { } else { } clause. It works great!

I've also managed to embed images in the mails as well, so if you are
looking for a mass mailer, I highly recommend the open source PHPmailer
class.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация