How To Send An HTML Newsletter

Who here hasn't tried to create and and send an"Content-Type:" which identifies the type of content
HTML newsletter by email. It sounds easy enough.that is included in that email. The emails that you, me,
Create an html page, copy the code, paste it in emailand everyone usually send are mostly text. Plain
and voila. Well it does, until you actually try it.Text to be exact. That's why when I tried to copy
For a long time, I too tried to figure out how to sendand past the html source code in the past it had just
an html email newsletter. I tried just about everyshown up as HTML.
way to send it. One of the ways was to save theWhen I saw the content type for the text emails it
html page and then attach it as an html file with thewas:
email. I tried just copying the source code of theContent-Type: text/plain;
html file and send that in. I even tried saving theWhen I saw the content type for the html emails
webpage as an email file and that didn't work either.which displayed very nicely, it was:
After trying a few more ideas I decided it's best toContent-Type; text/html;
just use plain text until I can figure out how to sendWOW. I mean I couldn't belive it that after all this
it correctly.time it was that one small line that had stopped me
As luck would have it though I did find out how toand probably countless others from successfully
finally send an HTML newsletter by email. I wassending html emails.
working on an email comments form with ColdFusion,But how would you tag your email as html?
a web programming language, one of featuresIt depends on how you're sending it.
included sending data in HTML format. I thought whyIf you plan on sending your html email newsletter
not try it, it might just work. So I copied the code ofwith a web programming language, such as Cold
an html webpage and then emailed it to myself, andFusion then you can use cfmail's type="HTML"
voila.feature, which will automatically set the
But had I really figured it out though? There had toContent-Type to text/html and display the email as
be something else in the code which ColdFusionan HTML Newsletter.
added that allowed the newsletter to displayIf you plan on sending it with ASP.NET, then the
correctly. I looked at the html code for the email andbelow line should clear it up:
there was nothing different about this email. It wasYourMessageName.BodyFormat = MailFormat.Html
the same code as all the other html newsletters thatOr if you plan on using PHP then it should look
I had tried and tested in the past. Except that thissomething like this
one displayed correctly and the others didn't. Odd."To: The Receivers Name \n" .
Why didn't the newsletter work when I tried to"From: The Senders Name \n" .
copy, paste and email it. It's the same email and the"MIME-Version: 1.0\n" .
same code so it should work just as fine. Something"Content-type: text/html; charset=UTF-8");
was missing.Most, if not all web programming language include a
A couple of days later I went back to look at thefeature which allows you to send html data.
code for the email thinking that maybe I hadTip: Make sure the code or software that you use to
overlooked something. The source code was still thesend email has support for MIME, which allows you to
same, nothing had changed. So what could it be?send non text emails, HTML etx.
That's when I stumbled on to a small line that wouldSo now you know the secret. It's not the code, it's
change everything.the email's content type which decides how to
The line I'm talking about is the content-type, whichdisplay your HTML email newsletter. Now that you
is part of every email's header file. I'd read aboutknow how to send HTML email, make sure to test
content type, but most of it had to do with XHTMLyour newsletters with different email accounts
webpages. After a little bit of research here's what I(Yahoo, Hotmail, Google, etx). Each one of them
discovered:tends to display your HTML differently. Test, Test,
Every email has a property known as:and Retest.