Jump to content

mail( ) function


ToddAtWSU

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.