phpnewbie112 Posted July 22, 2008 Share Posted July 22, 2008 Hello, I have a small script intended to send e-mails to multiple destinations using an upload form. I upload the txt file with one email per line, read it and send via w while loop to each line. Sending to up to 5000 emails in 1 file worked fine but when I try large files up to 10000, it is interrupted in the middle. any idea from where the problem might be coming? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/115999-while-with-up-to-large-records/ Share on other sites More sharing options...
MadTechie Posted July 22, 2008 Share Posted July 22, 2008 Could be overloading the email server, timingout, limits on the email server.. do you have any other info (errors etc) Quote Link to comment https://forums.phpfreaks.com/topic/115999-while-with-up-to-large-records/#findComment-596401 Share on other sites More sharing options...
unkwntech Posted July 22, 2008 Share Posted July 22, 2008 add <?php error_reporting(E_ALL); ?> to the top of the file and see if it produces any errors. Quote Link to comment https://forums.phpfreaks.com/topic/115999-while-with-up-to-large-records/#findComment-596404 Share on other sites More sharing options...
phpnewbie112 Posted July 22, 2008 Author Share Posted July 22, 2008 I will add the line to check but I tried to set an echo for every request sent to see on what email it is interrupted. The weird is that it stop at around 2000 while the 5000 files goes without any problem Quote Link to comment https://forums.phpfreaks.com/topic/115999-while-with-up-to-large-records/#findComment-596417 Share on other sites More sharing options...
unkwntech Posted July 22, 2008 Share Posted July 22, 2008 It sounds to me like the SMTP server is setting a limit, likely to prevent spammers, or your script is reaching its maximum exicution time. What is the value of ini_get('max_execution_time') and how long is it taking to run? Quote Link to comment https://forums.phpfreaks.com/topic/115999-while-with-up-to-large-records/#findComment-596422 Share on other sites More sharing options...
MadTechie Posted July 22, 2008 Share Posted July 22, 2008 maximum exicution time. would should report an error, just to confirm.. is this the same list of people and the same file ? Quote Link to comment https://forums.phpfreaks.com/topic/115999-while-with-up-to-large-records/#findComment-596425 Share on other sites More sharing options...
phpnewbie112 Posted July 22, 2008 Author Share Posted July 22, 2008 ini_get('max_execution_time') returns 30. Just to clarify further, the same file but with 5000 emails worked fine, adding an additional 5000 it fails. that's the point. and it failed even before reaching the 1st 5000 emails that already worked fine. Quote Link to comment https://forums.phpfreaks.com/topic/115999-while-with-up-to-large-records/#findComment-596661 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.