Electric Type

Multimedia

About Us

News

Help

All about HTML Email

Page 3 — How It Works

Here's how it works. Incoming mail is stored in your POP account on an Internet server as multipart MIME documents. A message is divided into a text component and MIME file attachments. These attachments are associated with a URL that calls in the graphics, animations, sounds, and other elements at viewing time.

Outgoing HTML email is sent like any other piece of Internet mail using SMTP - the trick is to manipulate the header information that accompanies your message.

In addition to To:, From:, Cc:, and Bcc:, an email header specifies content type, transfer encoding, and display properties of the mail. The most important of these header fields for HTML email is Content-Type. Most mail agents send mail with Content-Type: text/plain, but you want yours to read Content-Type: text/html. Most mail agents will not let you modify this field, so you have to be crafty. One solution is to compose your HTML email manually using a Unix mailer program. This will enable you to type a customized header. Here's an example of a test message with appropriate header information:

    Errors: errors@YourDomain.com
    From: Your Name <you@YourDomain.com>
    To: Recipient Name <them@Theirs.com>
    Subject: test message
    MIME-Version: 1.0
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Content-Disposition: inline; filename="filename.html"
    Content-Base: http://www.YourDomain.com

    <b>Hello there.</b><br>
    Monkey see, monkey do.
    .

Notice the extra line break before the body of the message. In a Unix mailer program, the body begins with the line following two consecutive carriage returns and ends with a single period on its own line. To test your message, send it to yourself.

    % sendmail -t filename.html
The -t tells your Unix mailer to read the header information from the file itself.

Congratulations! Now you can send HTML email. It felt really great the first time I sent myself an HTML email. I admit my enthusiasm has diminished over time. On the bright side, the tools are catching up; it is becoming easier and more common to send and receive HTML email. For instance, the November 1997 release of MS Outlook Express is equipped to set "Content-Type: text/html" with a button-click.

Now it's time to set up an HTML email offering on your own site. Just remember to take an occassional weekend to yourself. At least whistle while you work.

next page»


Dynamic HTML  

Frames  

HTML Basics  

Stylesheets  

Tables  

XML  

Javascript  

Database Connections  

Intro To Perl  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.