|
Posted by cybervigilante on 04/30/07 01:31
I sent HTML formatted email, using PHP, to my Yahoo address from my
server, and it came out fine, styles and all. I sent it to my gmail
address to test it and all I see is the raw html code. But I do get
formatted email in gmail, so I know people make it work somehow. I'm
looking right at a gmail message that I copied to Dreamweaver and it's
using Strong and Red text attributes that work in gmail. But mine
don't.
What do you do different in gmail to get formatted HTML email?
Here is my PHP code, which Does receive correctly, with color and
formatting, in Yahoo mail, but not gmail.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title>PHP Guestbook</title>
</head>
<body>
<h1>mailtest</h1>
<?php
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$msg = "<h2 style='color:red; background-color: Fuchsia; border: thick
dotted; border-color: Blue; font-family: sans-serif; font-style:
italic; margin-left: 20%; padding: 20; margin-right: 30%;'>Test of
formatted email from <br>Just Health Now server, with html headers</
h2>";
echo ($msg);
mail("seren37@yahoo.com","no damn color",$msg,$headers);
?>
</body>
</html>
[Back to original message]
|