Hi all,
Background: I have a script that sends an email using PHPMailer. The recipient is not receiving them because the spam filter on the receiving end is blocking them.
According to thier IT department the headers are not sending the "senders" email address.
The code below is simple but can anyone see why the email would be picked up by the spam filter.
$to = $_SESSION['imaintemail'];
$subject = $_SESSION['companyname']. " Room Audit" ;
$headers = "From: Support NaveX" . "<support@domainname.com.\r\n";
$headers .= "X-Sender: <support@domainname.com>\r\n";
$headers .= "X-Mailer: PHP\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "Return-Path: " . "<support@domainname.com>\r\n";
$headers .= 'Cc: support@domainname.com' . "\r\n";
$out = "Room ID: " . $_POST['HotelID']. "\n";
$out .= "\n";
$out .= "Audited by : " . $_SESSION['name_f'] . " " . $_SESSION['name_l']. "\n";
$out .= "\n";
$out .= "Audit Date : " . $inspectiondate. "\n";
$out .= "\n";
$out .= "Room Audit - Room No: " . $_POST['Room']. "\n";
$out .= "\n";
$out .= . $_POST['Seq06']. "\n";
$out .= "\n";
$out .= . $_POST['Seq07']. "\n";
$out .= "\n";
mail( $to, $subject, $out, $headers );
Many thanks for any help or advice you can provide.
Cheers,
Blackbox