[thelist] Sending HTML email in PHP
Atul
atul79 at rogers.com
Fri Jun 20 17:32:12 CDT 2003
Hey Folks,
I am sending HTML email in php using the mail() function. My headers are as
follows:
$headers .= "From: ".$from_name."<".$from_email.">\r\n";
$headers .= "To: ".$to_name."<".$to_email.">\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "X-Priority: 1\n";
Now, the message body is a piece of HTML code that consists mostly of
tables for formatting purposes.
This piece of code when viewed through the browser is fine. It comes out as
expected. But when, the
email is opened in any mail client, the format is all funked up. The
characters are out of place, table
cells are missing. And this is an anomaly that sometimes shows up on some
emails. Other times, its is
fine.
Am I missing anything in the headers? Are the ones that I am using above
correct? Do I need to do
anything else to preserve the formatting?
Thank you
Atul
More information about the thelist
mailing list