Creating HTML EmailExample Source Code
|
And here is a copy of the ezine the above source code produces: |
![]()
Possibilities You are subscribed as will@example.comUnsubscribe information is at the bottom of the ezine. Inside:Creating HTML EmailYour subscription is sponsored by: Prelude:Hello William, WillMaster.com is moving to a new server. This means you might need to change your whitelists. If you whitelist by IP address, the new IP address is 64.21.87.170 (the old one was 128.121.218.30) If you whitelist by domain, there is no change. The domain is still willmaster.com If you whitelist by email address, the "From" and "Reply-To" addresses will now be p@ instead of possibilities@ (both willmaster.com). The possibilities@ address is getting so much spam it's time to change. And now, while other things are changing, is a good time to do it. The new information will be effective next issue. For some of you, the willmaster.com DNS change will already have taken place by the time you receive this issue. For others, it may be a few days. It depends on how fast your ISP updates their DNS information database. The domain has several hundred scripts. And other things changed. It may be a long time before we are done with checking things. We could use some help, if you happen to surf our way. Should you see anything that needs fixing, please let us know. The "Contact Us" link at the bottom of every content page can be used -- if no such link is available on the page with the glitch, the home page has one. See the "I'm Stressing About This" blog entry on the home page at http://willmaster.com/ for more info. "I'm Stressing About This" "Form Hijacking Resources" (with free formatted copy 'n paste resource list for your web pages) "Unique Style Sheet For Printer-Friendly Page" "Downloading and Redirecting From the Same Link" Those are some recent blog entries you may have missed. See http://willmaster.com/ Today's article is about creating HTML email that renders well in a variety of email reading software. Enjoy the issue, William.
Will Bontrager If the Possibilities articles are useful to you, they might be useful to your site visitors, too. See http://willmaster.com/possibilities/syndication/ Possibility:Creating HTML EmailCreating the contents of an HTML email is nearly identical to creating an HTML web page. The source code of a web page might be copied and pasted into an outgoing email without modification. Yet, what looks good in one email reading program might be a mish mash of confusion in another. The primary consideration when creating HTML email is that email reading software is less standardized than web page browsers. Some email readers can read only plain text. This is merely mentioned. The focus of this article is creating HTML email for software that can read HTML email. Email readers are titles like Thunderbird, Eudora, and Outlook. For the purpose of this article, web pages that let email be read with a browser are also considered to be email readers for examples, the email services provided by http://hotmail.com/ and http://mail.yahoo.com/ It is not always possible to know ahead of time which email reader will be used at the email's destination. Surveying every recipient is one way to obtain the information. Another is to record the information in the X-Mailer email header line with the subscription address whenever an emailed subscription is received. Unless you can determine that most recipients will be using one type of email reader, it is prudent to design HTML email for appropriate display on the greatest number of email readers. The easiest way to accomplish that is to use only HTML and a minimum of HTML tags. Most popular email readers understand at least some CSS. Things that should not be used if it can be avoided:
If you must use any of the above, and even if you don't, send test emails to as many of the popular email readers as you can. Expect trial and error until you become familiar with what each email reader is (and is not) capable of displaying in an acceptable manner. Images can be displayed in HTML email by linking to them the way it's done in a regular web page. Use absolute http://...URLs, though. Relative URLs will not work. Similarly, web page and download links can be incorporated. By way of example, let's look at how the HTML version of the Possibilities ezine is constructed. (If you are reading this article in the Possibilities ezine, view the source code to see an example, or view the page at http://willmaster.com/possibilities/EzineSourceCode.html to see the source code of the entire ezine that carried this article.) The layout of the ezine uses a table to restrict the ezine width on wide windows. Overly long lines can be difficult to read. An external style sheet is linked to in the head area of the HTML email. The style sheet is used mostly for font styles and weights. At the top of the ezine is the masthead image. In case the email reader has images turned off, the name of the ezine is repeated below the masthead. Rarely are additional images used. The rest of the ezine is composed of heading text and paragraphs. It's a simple layout, one that most HTML email readers can display. Even with the simple layout, the ezine looks good. Sending the HTML Email Many email programs can send HTML email. This is good for sending an email to an individual. But if you'll be sending the email to a list of subscribers, you'll want good list software like B-Mailer(TM) from http://bontragercgi.com/programs/b-mailer/ B-Mailer can send text or HTML email, your choice. The one-click unsubscribe URL, because it can be used in both text and HTML email, needs to be constructed as a link when creating an HTML email. The link would be this format: <a href="[[UNSUBURL] ]">click to unsubscribe</a> To have the URL itself be the clickable text, the link would be: <a href="[[UNSUBURL] ]">[[UNSUBURL] ]</a> [[UNSUBURL] ] placeholders are replaced with unique one-click unsubscribe URLs when the email is sent. The one-click confirmation URL and other placeholders are similarly replaced when the email is sent. Many people feel that sending HTML email is better suited to their purposes than plain text. These days, with email readers that handle both formats seamlessly, many subscribers care more about content than format, so long as what they want is easily assimilated. The essential point to keep in mind, when sending HTML email is to "Keep It Splendidly Simple". Wait ... ... ... There's More!
See http://BontragerConnection.com/ for site owner-friendly tips and tricks and hands-on instructions for automating your web site and making it more effective.
Will Bontrager
No reprint permissions are granted, except through
syndication of the current article as provided at
Addresses, URLs, and Subscription Maintenance:
Link to unsubscribe:
To subscribe:
Changing email address: First unsubscribe your old address, then subscribe with your new email address.
Preferences:
Subscription Terms Of Service:
Archives:
Subscribers' links:
Publisher's email address:
Will & Mari Bontrager, Publishers
Copyright 2005 Bontrager Connection, LLC. Subscription Record:Please Note: We do not make our mailing lists publicly accessible. Privacy is precious. We respect yours. This personal subscription information is printed only on your copy of WillMaster Possibilities:
Name: William Bontrager
To remove your subscription (to unsubscribe): |