Monday, January 05, 2009

excellent and simlpe way to format html email

and it works beautifully across ms outlook, outlook express and gmail.

actually I was having problem in formatting email correct way. original code used inline css styles which was not working, so I changed styles but didnt work so I changed content-transfer-encoding from quoted-printable to 7bit and as always in programmers life, this hack worked for my outlook express. but failed to work on gmail. so on the way to give up, i found following page and tried the way they have asked to format email and it worked!!! woohoo..

see examples inside it

http://www.w3.org/TR/1998/NOTE-HTMLThreading-0105#Appendix%20B


one example for reference

From: Yogi Beera
To: Boo Booz
Message-ID: FD1D3K3KASDDFD17C00805FD459C86BB2BF@POPDOG
Subject: Joke
MIME-Version: 1.0
Content-Type: text/html;

<HTML>
<HEAD>
<STYLE TYPE="text/css">
<!--
.yogi--picnic-com {
color: black;
font-weight: bold;
font-style: normal;
text-decoration: none;
}
-->
</STYLE>
</head>
<BODY bgcolor="#FFFFFF">
<P CLASS=yogi--picnic-com>Konck Knock</p>
</body>
</html>

enjoy!!

No comments: