'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 } //--> Windows 98 Professional Reference -- Ch 31 -- Mail Management in Windows 98


Windows 98 Professional Reference

Previous chapterNext chapterContents


- 31 -


mail has gone from being a mild curiosity and a mere convenience to being an absolute necessity. Whether you're getting office emails or running a business, it's just about impossible to function in today's computing world without some access to email. In this chapter, we'll discuss both the low-level details of how email works and the upper-level details of how to set it up to work with Windows 98.

Email and How it Works

Sending email is like sending any other data across a network. First, a connection is made and the packet with appropriate routing and data information is assembled. Then the packet is sent to its destination, sometimes with receipt information returned to the user to let him or her know whether the packet was successfully transmitted. Read on to learn more about the details of SMTP, the protocol used to transmit email, and the contents of the packets themselves.

The Simple Mail Transfer Protocol (SMTP)

The basis of email transfer on the Internet is the Simple Mail Transfer Protocol (SMTP). SMTP is designed to reliably transfer mail between an SMTP client and an SMTP server. It's not a transport protocol itself, but runs on top of one (most often TCP, but it doesn't have to be the same transport protocol on both ends) that can give it a reliable connection. The relaying of SMTP-based data is invisible to the user.

Follow these steps to send an email message via SMTP:

1. A transmission channel is established.
2. The SMTP client sends the message to the SMTP server, which may be either the final destination (if the source and destination are using the same transport service) or a relay point on the way to the final destination. If the latter, as with a POP-3 server, then the SMTP server establishes a connection--from here on, it becomes an SMTP client itself. In case the mail is relayed, the SMTP server receives from the client not only the mailbox name of the message's recipient, but the name of the destination host.

NOTE: Internet Service Providers typically provide an SMTP server to be the relay between the client and the message's final destination.


3. The SMTP client initiates a mail transaction (a series of commands that identify the sender and recipient) and transmits the email message itself. If the same message is being sent to more than one recipient, only one copy of the message is transmitted to the destination (or relay) host.
4. The SMTP server responds, indicating that the command was successful, that more data is needed to complete the transmission, or that a temporary or permanent error condition exists that prevents the message from being transmitted at this time.
5. After the mail message has been transmitted, the client can either shut down the connection or send another message.

NOTE: An SMTP client can use its server not just for sending mail, but for other functions such as verifying email addresses and retrieving mailing-list subscribers' addresses.


Elements of an Email Message

An email message consists of two main elements: an envelope and its content. The envelope includes the following:

The content is the part you see when you open an email message and includes the following:

Headers are always ASCII-based, but the body can be either ASCII-based (as it is for an ordinary text message) or can use extensions such as MIME or UUencode to make binary attachments.

Attachments

SMTP's fundamental design allows it to transmit only data based on the ASCII character set, so, beginning in about 1990, extensions to SMTP's design were made to allow it to include binary attachments (and some other changes). These extensions are included in a Registry of possibilities. For attachments, SMTP supports MIME, discussed in the following section.

Encoding Formats

SMTP was not originally designed for use with binary attachments, and in fact not every email system uses SMTP--others use MAPI (Message Application Programming Interface) or MHS (Message Handling System) instead. Even getting the disparate email systems to talk to each other for ASCII documents was impossible at one time, let alone getting them to read each other's attachments.

The safest way to ensure that an email message travels through various mail servers on its way to its destination is to treat the whole thing as an ASCII file, ignoring anything that is not in ASCII text format. This includes most data files (word processing documents, spreadsheets, and databases), any kind of image file, any kind of executable application, any compressed files, and probably anything else that isn't readable in a text editor such as NotePad or EDIT.COM. In other words, if you can't paste data into the body of a simple emailer (forget the ones that support HTML for the moment) then any self-respecting mail protocol will discard it.

Thus, encoding formats to turn those binary attachments into ASCII format had to be developed to work with email. You've got three options to choose from:


NOTE: Both the email sender and recipient must use the same encoding format for the binary file in question. You cannot uudecode a MIME file, even if both sender and recipient support both encoding schemes.


Modern email programs often do the encoding and decoding automatically for you, so you never see it. Some older ones, however, would include the "ASCII-fied" binary file in the body of the message (looking like lines and lines of gibberish), with a note telling the recipient which decoder he or she needed to use to translate the file back into its binary format. In such a case, you'd need to cut the encoded data from the email message, paste it into a text editor such as Notepad, save the file, then run a decoder on it. If done properly and with the proper decoder, at the end you'd have the binary file back.

Let's take a look at how each works.

BinHex

BinHex (Binary to Hexadecimal Converter) was originally developed for the Macintosh but is now also supported on the PC--Eudora Light, for example, supports BinHex as one of its standard encoding schemes. If your email program doesn't support BinHex automatic decoding, you can identify a BinHex file by the starting line of the ASCII "garbage" that will appear in the body of the email message:

this file must be converted with BinHex 4.0

To convert this file, cut the garbage and paste it into a text file, saving it with an extension of .HQX and run it through a BinHex converter.

UUencode

UUencode (UNIX-to-UNIX Encode) was the first binary-to-ASCII converter used on the Internet. Since its presentation in 1980, it has been a standard part of UNIX, and versions for PCs and Macintoshes are also available. You can identify the "garbage" text of UUencoded files by the way they begin-- with the following line:

begin 0755 filename

To decode the file, cut all the text from the begin keyword to the end keyword, and paste it into a text editor. Save the file, then run UUdecode on the file like this:

uudecode filename

If your emailer supports automatic UUdecoding, you won't have to do this extra step--the binary file will be automatically converted to its original state.

MIME

BinHex and UUencode permit you to attach binary files to ASCII messages. MIME goes one step beyond that, allowing you to transform the messages themselves.

MIME (Multipurpose Internet Mail Extensions) is a set of specifications that permits you to send email messages in a format other than 128-character ASCII. MIME supports the following:


NOTE: Prior to the introduction of MIME, lines in an email message could be no longer than 1000 characters before a line break was required.


These features were not all exclusive to MIME when this specification was developed. They were special, however, in that they were not proprietary: If one MIME user sent another an email message, the recipient would receive what the sender intended. This scenario ignores the question of whether all of the file formats were readable by the recipient, but that's another matter, and not related to the question of what is possible to reliably send and receive, as long as the implementations of MIME follow the standards.

Rather than treating all encoded information the same, the MIME standard defines seven content types, described in Table 31.1.

Table 31.1 MIME Data Types

Type Description Further Information
Applications Indicates data that does not fit into any other category. Binary data and data to be processed by a mail-based application are included in this category. The subtypes of this type include the suggested filename, the general category of data type (for user information), and the padding used to make the number of bits divisible by eight (by bytes).
Audio Includes all audio data. Requires a speaker or telephone to "display" this data.
Image Includes .GIF and .JPG files. Requires a display device (printer, monitor, fax machine) to display data.
Message Indicates that this is an encapsulated message.
Encapsulated messages may be forwarded messages, messages split into several pieces because they're too long to be sent in one piece (in which case they'll be referenced as "Part X of Y") or external references to messages not downloaded but available.
Multipart Indicates data consisting of multiple parts, each with its own data type.


Each part will b defined in its own section. Multipart data may be supplied either as content to all be read, or for the email program to pick the best format for that reader (for example, if an ASCII and an HTML version of the same text were both available).
Text Indicates text content (not necessarily ASCII).
This text may be either ASCII compatible (plaintext) or Rich Text, which may be formatted.
Video Indicates that the content includes a time-varying image. This standard is used very loosely. MPEG is the supported format.

In addition to these named types, MIME also supports application-specific types that email programs can use by common consent. Any type name that begins with X is a private type that can be used by other mail systems supporting the same MIME type.

These content types are part of the MIME headers, following this syntax:

Mime version 1.0
Content-Type: multipart/mixed; boundary"="

In this example, multipart is the content type and mixed is the subtype to that content type. All content types have subtypes, even if it's only one (as for content type Video).

The encoding used for MIME depends on the type of data being transferred. If the data is mostly binary, then Base64 is used, producing a text file that looks quite a bit like a UUencoded file. If the data is largely text with some additional formatting, then the encoding scheme may be Quoted-Printable, which allows the user not only to read the text portion of the document in its ASCII form, but also to decode the file into an exact duplicate of the original.


NOTE: MIME is a complicated and still-developing standard. For further detail, look up RFC1521 on the Web.


Configuring an Email Client

There are three main server types:

These server types are described in more detail in the following sections.

POP (Post Office Protocol) Server

It was mentioned earlier how mail gets to the Internet, but how do you retrieve it? A standard for doing so, called the Post Office Protocol (POP) is now in its third version and widely implemented. Heard of accessing a POP3 server? That's what you're connecting to.

The function of a POP3 server is similar to that of SMTP, only in reverse. POP3 servers listen on port 110 for incoming requests from POP clients. A client running TCP establishes a connection with the POP3 server and logs on. If the logon is successful (that is, the user name and password match an account in the mail database) then the server passes the client--allows it to request transactions. At that point, the server figures out how many email messages are waiting for the client, tells the client to expect that number, and downloads them to the client. When the email has all been transferred, the client quits the TCP connection to the server and the mail session is completed.


TIP: If you're concerned about others getting access to your email, you can opt to log on to the POP server manually, rather than caching your password.


Specifying a POP3 server is simply a matter of filling in the server's fully qualified domain name in the email settings dialog box, perhaps in the Hosts section if there is one. If the POP server and the SMTP server are on the same machine, then you may have to supply only a single server name.

If you're logging on to your POP account from a computer other than the one you normally use, you may not want to download your messages permanently, deleting them from the server. In that case, you can opt to leave your messages on the server so that each time you connect, they're all still there.

SMTP (Simple Mail Transfer Protocol) Server

The fundamentals of SMTP performance were discussed earlier in this chapter in the section on how email works. Essentially, SMTP is the protocol used to upload mail messages to the Internet for delivery.

To send mail, therefore, you must identify the SMTP server to upload mail to. Somewhere in your email program's settings you'll have a place to enter the name of your SMTP server. In some cases, this server may have the same fully qualified domain name as your POP server; if so, then either fill in the same name or (if permitted) leave the space blank, as shown in the Eudora Light settings shown in Figure 31.1.

Figure 31.1 POP and SNMP server addresses.

LDAP (Lightweight Directory Access Protocol) Server

It's pretty simple to see why you'd want access to servers that let you send and receive email. Why do you need one with access to directory services (and what are directory services, anyway?) Well you don't have to have such access, and not all email programs can provide it, but directory services and LDAP have their place. Here's a little background on what it is that you're configuring access to.

One of the biggest issues surrounding the Internet is the question of how to find everybody attached to it. If you think about it, it's a daunting prospect: Millions of users around the globe are attached to the Internet by one means or another, and you can send email to any of them. This is accomplished with a general set of services called Directory Services, which supply the following services:

In short, just about any activity that involves finding something or someone is supported by directory services.

The obvious problem with such a huge directory is updating it regularly, as resource and human content and location on the Net is so dynamic. Telephone books get out of date, but their contents are generally fairly static. A dynamic community such as that of the Internet changes almost daily. Additionally, the number of people involved is enormous. To return to the telephone book analogy, most communities maintain a single book for a city or metropolitan area. How much time would it take to retrieve data from a country-wide telephone book or a single global one? Further, what happens if you want to look up someone in Africa but the Australia part of the directory is down? As they're in the same place, you can't get to any of the data if a centralized location is inaccessible.

X.500 is a directory service standard intended to work around both of these problems by distributing the global directory services among a number of sites. Each site running X.500 is responsible only for its section of the directory, so maintenance and updates can be done quickly. Even so, X.500 appears to users as a single global namespace, so users don't have to connect to several servers to get all the data they want. This directory service provides powerful searching techniques and support for image formats (specifically .JPG), which enable photographs to be included in the directory services.


NOTE: Like other directory services such as Whois and DNS, X.500 isn't without its problems. Its distributed nature slows down searches and the habit of some implementations of caching all responses before returning any to the user can take additional time. For security reasons, users may not even get all hits returned to them at once, but may have to make several searches to retrieve all the data. This type of directory services is still under development, however, and its designers are attempting to increase its responsiveness.


That's one implementation of the directory services end. How to get to it? Originally, X.500 directory services were readable with DAP, the Directory Access Protocol. For large machines, this TCP-dependent protocol was acceptable, but it didn't work well on smaller clients that may not have access to the full TCP/IP stack. So in 1993 the University of Michigan designed and developed a simpler version of DAP that would run on Macintosh computers and Windows with the existing TCP/IP stack. This more streamlined version is known as the Light Directory Access Protocol (LDAP).

LDAP defines the following components:

What this means in practical terms is that if your email program supports LDAP then you've got access to a global search directory. In Outlook Express, for example, you've already got several LDAP servers (as can be seen in the Internet Accounts dialog box shown in Figure 31.2), and the option of adding more to the list.

Figure 31.2 Installed LDAP servers.

Working with Specific Email Clients

So far in this chapter, a lot of the theory behind how email works has been covered. To round off, let's take a look at how several popular retail and freeware email programs work.


NOTE: This is not an exhaustive guide to using every email client in the world, but is simply intended as a basic reference for some of the more common programs. For further details, check your email program's documentation or online Help.


Begin by examining what all email programs have in common in terms of organization and functions.

Anatomy of an Emailer

The basic structure of a modern email program is a system of messages and folders similar to the file and directory structure used in Windows 98. As messages come in, they're moved to the folder representing the In box, and as the user reads them she has the option of moving those messages to either a predefined folder or a custom one made for the user's purposes. Even when messages are deleted, they're put into a folder--even if it's called Trash. In some email programs, folders contain other folders, for further organization. The method by which this is done varies with the email program; for one example, look at Figure 31.3, taken from Eudora Light 3.0.

This is one implementation of the folder/subfolder paradigm. In Eudora, there are three entities: folders, mailboxes, and messages. Folders must contain at least one mailbox, and may contain other folders. Mailboxes can only contain messages, not folders or other mailboxes.

Figure 31.3 Folders and mailboxes in Eudora Light.

Email Functionality

Email programs have functional similarity in addition to their structural one. The following sections describe the features included in most or all of the sample email programs outlined here, discuss how you might use these, and explain how to perform these actions.

Create or Open a Text File

Some email programs let you write not only in email but in a separate text attachment. This can be useful not only for writing emails that you want to think about before sending (have you ever written a message, queued it to save it, but then accidentally sent it?) but also for opening text attachments without having to open another program. These text editors may not contain any advanced options, but they can be a handy way to view and create ASCII content without dragging out Notepad.

Save an Email Message As a File

If you want to keep an email message but access it from Explorer, rather than from the hard disk (perhaps to import it into a word processing program), you can save it as a file. You can save just the text or the whole thing including the headers, and it is saved as a text document.

Print a Message

To create a hard copy of a message, choose the Print option. This creates a replica of the email message in its entirety, including headers, so if you want only the text, save the text as a file first, or copy it to the email-based text editor and save that.

Undo an Action

Whether you regret deleting that paragraph, transferring a file to a new mailbox, or queuing a message for delivery, you can often reverse the action with the Undo switch. This function does not, however, act on any mail that's already left your mailbox--that is, after a message is sent, you can't change your mind about sending it.

Cut, Copy, and Paste Text

Modern email programs offer the common word-processing tools of cut, copy, and paste so you can perform the following actions:


TIP: You can select the text to manipulate by dragging the mouse over it to highlight it or by using the Select All feature to copy all message text.


Delete Messages

To remove a message from its storage folder and prepare it for permanent deletion, you can delete it or transfer it to the Trash folder (if one exists) or the program's equivalent. It's roughly equivalent to the function of the Recycle Bin in Windows, in that you have a place to store files when you're pretty sure that you're not going to need them again, but want to have a chance to transfer them back to an active folder if it becomes necessary. To delete the "trashed" messages permanently, empty the Trash folder.


TIP: Not all email programs maintain a folder for deleted messages from which they can be retrieved. Particularly in older email programs, a message, once deleted, is gone forever.


Organize Mail

As discussed earlier, most modern mail programs maintain some kind of folder system so you can organize mail by subject, recipient, or whatever criteria you find useful. Messages are typically placed in the In box when downloaded from the mail server, but you can drag or transfer them to a new folder, whether a previously existing one or one you create. To view the contents of that mailbox, click on its icon or choose it from the email program's menu.

You can organize mail within folders by a variety of criteria, the exact nature of which depends on the particular email program. Sorting your messages by sender, date received, or subject can make it much easier to find a particular message that you might need.

Although mail is typically delivered to the In box when delivered, some email programs support a means to route messages to different mailboxes as they come in. To do this, specify filters to use, based on information in the header fields (such as who the message is from, or its subject header) or text in the body of the message. These filters can be applied not only upon receipt of mail but afterwards, so you can sort through the contents of your In box in one motion.


NOTE: Some email programs permit you to not only transfer mail, but automatically route mail to a specified user upon the mail's receipt.


Find Message Content

If you get a lot of mail, or don't recall which of the twelve messages from a single person included that person's telephone number, even a folder system can't always help you find the message you need. In that case, you'll need some mechanism by which you can search content without opening each and every message. Many modern email programs include a Find tool for this purpose.

Create Mail

When creating a mail message, you have several options, outlined in Table 31.2.

Table 31.2 New Message Options

Option Description Information Required
New Message A new message, with no automatic references to existing ones. Message text, recipient's name, and a subject header.
Reply Copies the text of the original message to a new message (with some kind of formatting to indicate that it's quoted) and retains the same subject header with some kind of text to indicate that it's in reference to a previous message Replies go to the sender. Message text. Subject header may be edited.
Reply to All Like a reply, except that the reply text is sent to all recipients of the original message.
Message text. Subject header may be edited. Typically, to reply to all original recipients, you must do something special--hold down the Shift key while replying, or choose the option from a menu.
Forward message (with some kind of formatting to indicate that it's quoted) and retains the same subject header, sometimes with some additional text to indicate that this is a forwarded message. No recipient is automatically designated. The sender is the person doing the forwarding. Copies the text of a message to a new Subject header may be edited.
Any additional message text.
Redirect message is formatted to come from the original sender, not the person passing the message along (although the message may be said to be sent "by way of" the intermediary, and text is not printed as a quote. Basically, the message retains the appearance of the original. Like forwarding, except that the and a recipient. Subject header may be edited. Any additional message text,

Change Message Status or Priority

An email program can code a message based on its status, whether that be read, unread, replied to, forwarded, or some other criteria. Some mail programs permit you to change the status of a message so that it looks as though something else was done to it--a read message now unread, or a forwarding notice removed.

A message can also be coded on the basis of a priority. By default, messages are generally sent with a normal priority, but some email programs support means to send them as urgent, or unimportant, allowing you to rank incoming messages based on their importance. For your own purposes, you might also be able to adjust the priority of your received messages so you know which ones to reply to first. Note that marking an email message you're sending as urgent won't have any effect on how quickly it gets to its destination; the Internet cares not for your personal concerns. All that changing a message's priority will do is perhaps get the attention of the recipient so that he or she opens it quickly--although you can't be sure of that, either.

Create Recipient Aliases

Email addresses are easier to remember than IP addresses, but complicated ones aren't always at your fingertips when you need them. To get around this problem, modern email programs often include an alias function that allows you to assign names to email addresses, so that all you need to type, for example, is Fred to send email to [email protected]. ship.org. The email program will automatically translate your alias into an email address that your SMTP server can understand.


NOTE: Email programs use a variety of terminology to describe this assigning of easy-to-remember names to email addresses, but in the SMTP standard this is known as creating an alias.


Aliases can also be a handy way of grouping email recipients. Create an alias that includes all the email addresses of your working group, and when you address email to that alias all those people will be included in the To:, Cc:, or Bcc: fields.

Change Your Email Password

If you're concerned about email security and have elected to log on to your POP3 server manually to pick up mail, you may want to change your password from time to time. Most email programs have some capability for letting you change or delete your current password, contingent on knowing the original.

Look Up an Email Address

If you know the name of the person you want to write but not their email address, you can sometimes use your email program to retrieve it from the global directory services described in the earlier section on LDAP. Look for an option that directs you to Directory Services, and enter the name of the person you're looking for.


TIP:[EEND] Directory services in which you can find out anyone's email address are a great idea, but some bugs are still being worked out of them. Entries are often inaccurate or outdated, or simply refer to someone else. Before sending confidential information to someone whose address you retrieved from a global directory service, it's wise to send them a preliminary email making sure that they are who you think they are. I've received several letters from people who clearly believed that there could be only one "Christa Anderson."


Create a Signature

Customized signatures can be a handy way of always including any or all of the following at the end of your emails:

Modern email programs let you create a signature file so that the text you want is appended to the end of all outgoing mail, The rule of thumb is that if it can be written in ASCII text, it can be included in a signature file. Some programs even let you supply a regular signature file and an alternate, perhaps to use for business and personal email.



NOTE:
Signature files more than four lines long are generally considered a netiquette no-no.


Attach Binary Files

If you want to send something other than ASCII text files across the Internet, you'll need to create an attachment and choose an encoding scheme. MIME seems to be in use for most people using PCs, but you may have to use another encoding scheme for some people.

Edit User Preferences

All email programs offer some interface for editing mailing preferences. The options depend on the mailer, but you can generally choose from among most of the following:

Conclusion

That's a quick roundup of email capabilities in Windows 98 and in general. At this point, you should have a basic understanding of what's going on when you send and receive email, how attachments work (and why they sometimes don't work) and some of the services available to you with modern email clients.




Previous chapterNext chapterContents

Copyright, Macmillan Computer Publishing. All rights reserved.