I've noticed fairly recently that when using php to send an email (with a script using mail() ) it does not work. It looks like the email has been sent but infact the email has not been sent. Whats confusing is their is no error message which does suggest that it has worked.
Now I may have found (or at least it works for me) two ways you can check to solve the problem.
Make sure the message within the script starts and ends with double quotes "message goes here". I think the email address does not matter too much, but try either single or double.
This will not be obvious and it took me two days and another web host to figure out this. After checking the above the email was still not sent. The problem was that the email account I was using did not exist, so I made one through cPanel and bingo it worked.
I was using cPanel 10, but I'm now on CP 11. I think from CP 10 they have changed the way sending email through php by making sure the account does exist. Maybe it's a bug or not we will have to wait and see, unless anyone can shed some light.
More so, the Cpanel Tweak Setting might disallow NOBODY header info from sending mail. With this, your mail might not be sent if php suscex isn't installed or available. The good thing is that mails will only be sent after identification/authentication on the server -- reducing spam!!!.
Success is achieved and maintained by those who keep trying.
Well if the idea behind the tweak is to reduce spam then hopefully it will work. It's a good idea that we have to make separate email accounts, it makes things much easier sorting out which email goes where.
Yep, taking from what I said in the first post and if it still or happens again then contact your web host to check the mail server.
Turns out over the past two days the mail server was playing up and the script I've done was correct. The web host just rebooted the mail server and hey presto, it's now working.
Bookmarks