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