MyBB Community Forums

Full Version: Why wont my PHP send emails come through?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
On three of my websites i have simple PHP contact email forms, one site is hosted under one paid hosting account and the other two are hosted on another hosting account but all with the same hosting company. My problem is that despite all this and despite the fact that the contact forms have virtually identical code i only receive emails from the first website (the one hosted by it's self).

It does not come up with any errors when i use the contact forms and the mail function returns successfully, i have checked the phpinfo of both servers and they are both identical. The only differences between the code is that the email subject is different and i have drop down boxes which have different values.

As i said, i never get any errors, i just don't get the email? Anyone able to help me?
You stated the working mail function was on a paid hosting account. You did not state whether or not the other two were on a paid account or a free account.
Most free hosts disable the mail function to prevent spammers misusing their services. If your sites are on a free account then this is almost certainly the problem. As a work around you might consider hosting the contact scripts on the paid account.
No they are both on paid hosting, on the same plan with the same hosting company and as i said, their PHP configuration is the same including that of the mail settings.
Bump... Is there any restrictions on what you can put as a subject of your email or something? This has got me stumped.
I think if that were the case the function would report a problem.

Another thing i can think of is it thinks the email address you're sending to is on localhost so the message isn't leaving the server. You can test the theory by changing the send to address to one not assigned to your own domain names (e.g. @gmail.com). I hesitate to present this theory since the scenario rarely occurs on paid hosts and commonly arises when the servers DNS config files are malformed. Which on any sort of hosting below a VPS would usually be out of your control.
Well it seems to be working now? I didn't change anything so i assume it was just a temporary server issue (one lasting several days!!??!!)
My my, how annoying.
Yeah i know and it just fills me with paranoia about how many emails people have sent me when the the server has been having the same issues and i didn't realise!