hi,

i have enabled the contact module, and when i submit the contact form, i get the "your message has been sent" message, but no email is ever sent.

i have confirmed that both relevant email addresses (from and to) are valid and can send/receive email. i have also tested that php on the host can in fact send email when i execute my own simple code using php's built in mail() function.

this code below (just copied from a simple example), when placed in its own file in the docroot, works fine and the email is in fact sent (addresses changed). i moved the code to a comment below.

am i missing something in configuring backdrop's mail system?

thanks for any thoughts.

 

Accepted answer

sorry for the delay in updating this. the email issue was in fact the hosting company bluehost, and the fact that they use the EIG email infrastructure (and a bizarre domino effect that had). bottom line: moved to a better host, problem solved. had nothing to do with backdrop whatsoever, sorry for the false alarm.

Comments

here's the code that works:

<?php
$to = 'laz@dummy.net';
$from = 'ricky@dummy.com';
$fromname = 'Info';
$subject = 'Email Subject';
$messagebody = 'This is a test of the email system.';
$headers =
    "Return-Path: $from \r\n" .
    "From: $fromname  < $from > \r\n" .
    "X-Priority: 3 \r\n" .
    "X-Mailer: PHP " . phpversion() .  "\r\n" .
    "Reply-To: $fromname < $from > \r\n" .
    "MIME-Version: 1.0 \r\n" .
    "Content-Transfer-Encoding: 8bit \r\n" .
    "Content-Type: text/plain; charset=UTF-8 \r\n";
$params = '-f ' . $from;
$result = mail($to, $subject, $messagebody, $headers, $params);
if($result === true) {
    echo "sent ok";
}
else {
    echo "sent NOT ok";
}

Probably goes without saying but I'll say it anyway... have you checked your spam folder?

thanks for the thought, but yes i did check spam.

i now wonder if the issue might be with my hosting company (bluehost). i have been trying to get someone technical to help me there.

sorry for the delay in updating this. the email issue was in fact the hosting company bluehost, and the fact that they use the EIG email infrastructure (and a bizarre domino effect that had). bottom line: moved to a better host, problem solved. had nothing to do with backdrop whatsoever, sorry for the false alarm.