I have a strange situation where I'm using the mail() function, but when I assign it to a variable it just returns blank. I was under the assumption that mail would return a true or false? Is that not the case?
In any case, do you guys see anything wrong with this code:
$date_time = date('Y-m-d H:i:s');
$mime_delimiter = md5(time());
$mail = <<<EOF
This is a MIME-encapsulated message
--$mime_delimiter
Content-type: text/plain
Content-Transfer-Encoding: 8bit
$message
--------------------
DATE/TIME : $date_time
EOF;
$headers = 'Mime-Version: 1.0\r\nFrom: ' . FROM_EMAIL .'Mime-Version: 1.0\r\nFrom: ' . FROM_EMAIL .'\r\nContent-Type: multipart/mixed;\n boundary=\"$mime_delimiter\"\r\nContent-Disposition: inline';
echo "$mail";
$success = mail($email, $subject, $mail, $headers);
echo 'success = ' . $success . '<BR>--<BR>';
if (!$success) {
echo 'Error, message not sent.';
}
It just keeps giving me "success = " Error, message not sent"
I don't see anything in my server error log or mail log? It's as if it isn't doing anything at all?