Forum Moderators: coopster
I recently moved hosts and I am now using QMail instead of POSTFIX. My PHP mail() functions that used to work, now do not show HTML. Here are my mail() headers:
$headers = "From: \"My Name\" <myemail@test.com>\r\n";
$headers .= "Reply-To: myemail@test.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers .= "Content-Transfer-Encoding: 8bit;\r\n\r\n";
$headers .= "\r\n";
mail("sendto@test.com", "Subject Goes Here", "Message Containing HTML Code", $headers);
When I get emails, it prints this at the top of the email:
Content-Type: text/HTML; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit;
I was wondering if my headers are incorrect?
Thanks in advance for your help!
Wes
I had one where this order was the only I could make work
To
From
Subject
Return-Path
Reply-To
Content-type
Mime-Version
having Mime-Version last was the key. Though I was injecting this into the qmail queue, not using the mail function.
try moving them around and see what happens