ToddAtWSU Posted September 28, 2007 Share Posted September 28, 2007 I created a web page and upon completion and hitting a submit button, the information is gathered up and sent out in an e-mail using the mail( ) function. We have been having recent problems with the e-mails not being sent even though the mail( ) function returns true. I have the mail( ) call in a while-loop so it keeps trying until mail( ) returns true. Has anybody else had a problem with the mail( ) function not always sending the e-mails? Is there a better, safer way to send e-mail through PHP or maybe even Javascript that I should try to use to more reliably have the e-mails sent? Thanks for your help! Quote Link to comment https://forums.phpfreaks.com/topic/71111-mail-function/ Share on other sites More sharing options...
mcmuney Posted September 28, 2007 Share Posted September 28, 2007 Is it possible that the emails are queued in the server? Quote Link to comment https://forums.phpfreaks.com/topic/71111-mail-function/#findComment-357609 Share on other sites More sharing options...
freakstyle Posted September 29, 2007 Share Posted September 29, 2007 hey there, first step is to echo out the data you are sending to the mail function. and kill it before it attempts to mail. then if everything looks hunky dory *(ie, the message in your browser) send it off to a specific email address you can look at. if nothing shows up, make sure to check all folders, including junk and or spam. sometimes firewalls / spam filters will catch a false positive. if you still find nothing, then test the function out, hard code just the basic info and maybe a text string. if that doesn't work then there's an issue with your server most likely, be it the smtp or a que as mcmuney stated. good luck Quote Link to comment https://forums.phpfreaks.com/topic/71111-mail-function/#findComment-357622 Share on other sites More sharing options...
ToddAtWSU Posted September 29, 2007 Author Share Posted September 29, 2007 I know the mail function works, because we have 30-40 people using this and I would say of each person sending one e-mail a week, we get all but a couple of them. But this last week we had 3-4 people not receive theirs. The e-mail is sent to the person submitting the form and a "manager" type person. The problem is when it says it submitted the e-mail, both of the users are not getting the e-mail and we have heavily checked our Junk mail/spam mail filters and they do not appear in there. One person even tried from his home and work computer and both times, the submission failed on him. The site is hosted by a friend of mine, but he is not a computer person much, so I wrote the pages for him, so what can we do to check the queue or smtp stuff. If there are some tests we can run that would be great to see if we can diagnose the problem. So even though we do receive ~90% of the submissions or more, we still want to try and figure out why we lose some. Thanks for all your help and advice on this. Quote Link to comment https://forums.phpfreaks.com/topic/71111-mail-function/#findComment-358102 Share on other sites More sharing options...
ToddAtWSU Posted October 2, 2007 Author Share Posted October 2, 2007 Anybody else have any ideas? I really need something to be more of a solid solution than good luck with the server....Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/71111-mail-function/#findComment-360483 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.