Hello,
I am using the PHP mail() function to send HTML formatted emails. I developed some code on my Windows machine and the emails were getting sent nicely using Outlook. Once my code was deployed to a Linix machine (email server is EXIM) the email content type does NOT seem to take effect. The emails get sent with HTML text in the body.
/ Headers /
$headers = "From: test@test.net>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/ Recipient. /
$to = $recipient;
/ Subject. /
$subject = "HTML email";
/ Message. /
$message = '
<html>
<head>
<title>Your membership with The Magic Flute</title>
</head>
<body>
<p>
This is a test.
</p>
</body>
</html>
';
/ Send the e-mail. /
return mail($to, $subject, $message, $headers);
Are there issues with the Web Server user (nobody) sending HTML emails? Any ideas why it's sending HTML as text?
I appreciate your time and any help you can be.