Hello,
I've got a very simple PHP script that mails me a contact form of a website.
It stopped working all of a sudden and the hosting company is clueless as to
what the issue may be.
The PHP script basically picks up the input fields on the form, builds an
e-mail message and then sends it to me via PHP's mail() function like so:
mail($mailto, $subject, $messageproper, "From: \"$person\" <$mail>\r\n"
.$headersep . "Reply-To: \"$person\" <$mail>" . $headersep . "X-Mailer:
chfeedback.php 2.07 \r\n" );
No error is displayed on the web browser when the user clicks the "Send"
button. The problem is that the e-mail message just doesn't get delivered.
Needeless to say, this has been working OK for the past year. Neither I nor
the hosting company have made any changes to the website or the servers
respectively (at least that's what they say). However, the script is not
functioning anymore.
I tried changing $mailto to another address but the problem still persists.
Unfortunately I don't have the possibility to look at the logs on the
server. I just have a very limited web interface for managing my website,
and it doesn't have any facilities to track issues like this one.
Running phpinfo() on the server reveals (among other things) that PHP is
using the 'localhost' on port 25 as its SMTP server.
At this point I cannot say that the problem *lies* within PHP itself. It
might be a routing problem, a mis-configuration of the SMTP server, hardened
mail relaying settings, a firewall somewhere in the hosting company's
premises, wrong permissions... as well as many many other things...
Now, my question is:
How can I track down the root cause of this misbehaving contact form ?
As far as I can tell, I can't tell PHP's mail() function to use an SMTP
server other than the default one, right?
Some relevant info:
- Red Hat Linux
- Apache 2.0.52
- PHP 4.3.9
Thanks,
Fernando
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php