I know there are a few of these topics out there, but none of the conclusions for those worked for me.
I'm having a few problems with the delivery of e-mails on my site.
I have a PHP script that takes form input and sends it as an e-mail to me; however, when I submit it, it doesn't go through. I have an echo tell me whether or not the message was sent, and it always fails.
Also, I cannot send e-mail from the RoundCube client that cPanel comes with. I can receive e-mail to it, but any messages sent from it do not go through.
Here's my PHP:
Any help would be appreciated.
I'm having a few problems with the delivery of e-mails on my site.
I have a PHP script that takes form input and sends it as an e-mail to me; however, when I submit it, it doesn't go through. I have an echo tell me whether or not the message was sent, and it always fails.
Also, I cannot send e-mail from the RoundCube client that cPanel comes with. I can receive e-mail to it, but any messages sent from it do not go through.
Here's my PHP:
PHP:
<?php
$to = "my@email.com"; // Hidden
$subject = "Test Subject";
$body = "Test body message.";
$headers = "From: admin@deliriumla.x10.mx\r\n";
$headers .= "Reply-To: admin@deliriumla.x10.mx\r\n";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message sent</p>");
} else {
echo("<p>Message not sent</p>");
}
?>
Any help would be appreciated.