I have the following headers for emails sent with phpmailer:
$headers = 'From: ' . $from . "\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-Type: text/html; charset=iso-8859-1' . "\r\n";
$subject = EMAIL_SUBJECT ;
I pass them like this (standard it seems…):
mail(EMAIL_TO, $subject , stripslashes($message), $headers);
As a result my mail is perfectly sent the subject from etc appear but in the main body of the message before the html starts, I get:
Message-Id: Date: Thu, 8 Dec 2011 08:55:33 +0100 (CET) Return-Path: my@email.org X-OriginalArrivalTime: 08 Dec 2011 08:04:43.0526 (UTC) FILETIME=[0B336260:01CCB580]
I could not get rid of it. thank you.
I modified the code as follow:
Notice, I removed the \r of the Content-type line and changed the order of the headers.