Welcome to Geeklog, Anonymous Monday, January 13 2025 @ 12:08 am EST

Geeklog Forums

delay in MAIL sytem...


pinco

Anonymous
the problem is... my ISP have a limitation about send the e-mail.. the rule is:

1 e-mail every 2 seconds....

Please help me to modify the code in mail.php

Thank you advance for your help
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Try putting sleep(3); Right after the first line here in the for loop: for ($i = 1;$i <= $nrows; $i++) { This tells the server to stop execution on the script for 3 seconds. See if that works for you.
 Quote

Anonymous

Anonymous
Be sure to increase this setting in your php.ini: max_execution_time = 30 ; Maximum execution time of each ; script, in seconds Otherwise, you will only be able to send out 10 emails before the server kills the script for running too long.
 Quote

Anonymous

Anonymous
Time spent in other functions don't count towards the max_execution_time in the calling script. I think it works the same way for php's built-in functions like sleep. It's very possible though that anyone who has a large mailing list will get timed out the way the code is currently written.
 Quote

pinco

Anonymous
GOOD SOLUTION!!!
 Quote

All times are EST. The time is now 12:08 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content