[PHP] Mail () problems - Need help!
I''ve a php script that gets e-mail addresses from a MySQL db and then using the mail() sends the same message to 100+ recipients. I tested the script twice. FIRST TEST. (1) I commented out the mail() routine. (2) I looped to get the e-mail addresses. (3) I echoed the e-mail addresses on the screen. It worked fine (displayed 136 e-mail addresses) and fast! SECOND TEST. (1) I uncommented out the mail() routine. (2) I used my own e-mail address as the recipient in the mail(). It was supposed to loop to get the e-mail addresses, display them on the screen, and send me an e-mail every time (136 times). It loaded very slow (loading indicator). Finally it displayed url not found with the name of the script file. And, I got no e-mails. Is there a conflict between php mail() and the mail server when multiple e-mails are involved? Thanks! Anthony F. Rodriguez ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail () problems - Need help!
Your browser probably timed out. Try using flush() after the echo in the loop. You may also encounter PHP timeout - take a look at set_time_limit() if you bump into that. What I don't understand is why you received no mail - are you sure your mail() syntax is correct? You should try a third test: (1) Change the loop condition so it only loops once; (2) Use the uncommented mail() version; See if you get any mail / error messages... HTH Bogdan Anthony Rodriguez wrote: I''ve a php script that gets e-mail addresses from a MySQL db and then using the mail() sends the same message to 100+ recipients. I tested the script twice. FIRST TEST. (1) I commented out the mail() routine. (2) I looped to get the e-mail addresses. (3) I echoed the e-mail addresses on the screen. It worked fine (displayed 136 e-mail addresses) and fast! SECOND TEST. (1) I uncommented out the mail() routine. (2) I used my own e-mail address as the recipient in the mail(). It was supposed to loop to get the e-mail addresses, display them on the screen, and send me an e-mail every time (136 times). It loaded very slow (loading indicator). Finally it displayed url not found with the name of the script file. And, I got no e-mails. Is there a conflict between php mail() and the mail server when multiple e-mails are involved? Thanks! Anthony F. Rodriguez ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail () problems - Need help!
Anthony, A common issue. Pertinent info required: 1 Win or *nix? 2 able to send a single msg to a single email addr? 3 does loop get address and send msg to that address, 136 times; or does loop collect 136 addresses and then after closing the loop a single msg is sent to 136 recipients in the To: field? Might also be helpful if you post the pertinent piece(s) of code, and the Email para from the php.ini file. Please advise, =dn I''ve a php script that gets e-mail addresses from a MySQL db and then using the mail() sends the same message to 100+ recipients. I tested the script twice. FIRST TEST. (1) I commented out the mail() routine. (2) I looped to get the e-mail addresses. (3) I echoed the e-mail addresses on the screen. It worked fine (displayed 136 e-mail addresses) and fast! SECOND TEST. (1) I uncommented out the mail() routine. (2) I used my own e-mail address as the recipient in the mail(). It was supposed to loop to get the e-mail addresses, display them on the screen, and send me an e-mail every time (136 times). It loaded very slow (loading indicator). Finally it displayed url not found with the name of the script file. And, I got no e-mails. Is there a conflict between php mail() and the mail server when multiple e-mails are involved? Thanks! Anthony F. Rodriguez ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php