I am getting the following error while sending the html email.
This is a MIME encoded message.
--HTMLDEMO40900ecf2ac1e
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: base64
VGhpcyBpcyB0aGUgcGxhaW4g
The original code to send email is:
$headers = "From: info@abc.com\r\n";
$headers .= "Reply-To:".$fromemail ."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$boundary = uniqid("HTMLDEMO");
//tell e-mail client this e-mail contains//alternate versions
$headers .= "Content-Type: multipart/alternative" .
"; boundary = $boundary\r\n\r\n";
//message to people with clients who don't
//understand MIME
$headers .= "This is a MIME encoded message.\r\n\r\n";
//plain text version of message
$headers .= "--$boundary\r\n" .
"Content-Type: text/plain; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
//create the text message if the MIME is turned off
$txtMsg = $contact . "\n";
$txtMsg .= $empname ."\n\n";
$headers .= chunk_split(base64_encode($txtMsg));
//HTML version of message
$msg = "<html>" . $contact . "<br>";
$msg .= $empname ."<br><br>";
$msg .= "</html>";
$headers .= "--$boundary\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode($msg));
$subject = "k12jobs.com - " . $title;
mail($to, $subject, "", $headers);
Please help.