Welcome to WebmasterWorld Guest from 54.226.133.245

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

10000 Emails do not go out

     
5:16 am on Jul 18, 2008 (gmt 0)

New User

5+ Year Member

joined:July 18, 2008
posts: 2
votes: 0


Hi

I am trying for quite a lot of times to send 10000 or more emails at once. I have tried it many ways by loop , but its stops after sending 900-1000 and then by calling system in php so that the loop continues in backend, it increased the performance but it again it can send up to 1700-1800 atmost and in all cases I have written set_time_limit(0) on top of the script.

Can anyone suggest any other way out for this.
Please Help

8:24 am on July 18, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


Hello and Welcome to WebmasterWorld!

The way you are describing your problem is that you are getting errors from this script. Is this true? If so what are they? It's more likely that there is a limit on how many emails you can send from your host, but who knows. In any case, I'd make this script using PHP CLI; it will run better and it will have no time limit.

9:05 am on July 18, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
posts:661
votes: 0


if you're using phpcgi, it might also be apache that's stopping the execution after a certain cpu usage. I agree with eelixduppy, use the commandline php.
If you cannot do that, just send smaller portions: send out 100 emails, then redirect your browser to that same script, passing a parameter that tells the script where to continue. that should do the job, you just have to keep your browser open.
12:02 pm on July 18, 2008 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts: 4388
votes: 2


I'll setup a cron and as suggested will send it by chuncks
pause 2 secs do it again
etc....
3:17 pm on July 18, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


It's more likely that there is a limit on how many emails you can send from your host, but who knows.

Many hosts will pose a limit on the number of emails that can be sent (per hour). Simply to avoid spamming. I think a limit of a few hundred is not uncommon.

12:48 pm on July 22, 2008 (gmt 0)

New User

5+ Year Member

joined:July 18, 2008
posts: 2
votes: 0


Do your pausing means sleep the execution for some secs. In any case we have to send all this 10000 emails in one click and if it processes in backend(cron or something else) no problem.

But while we are sending emails we are also storing them in our database
to track them if they delivered, bouncce.. etc.., Which is the main purpose of sending those emails as one does in case of email campaigns.

12:57 pm on July 22, 2008 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts: 4388
votes: 2


Yes, sleep is correct and your cron may by the same token perform your DB insert
2:36 pm on July 22, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Feb 22, 2008
posts:43
votes: 0


Just another thought on the timeing, if PHP is installed as a CGI this will may timeout after around 5 min even if you set the max execution time to 0.
2:55 pm on July 22, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
posts:661
votes: 0


cgi-scripts don't just "time out", they usually reach a limit and get killed, see [httpd.apache.org...]