|
Every day the citizens of the Internet send each other billions of e-mail messages. If you are online a lot, you yourself may send a dozen or two e-mails each day without even thinking about it. Obviously, e-mail has become an extremely popular communication tool in a very short time!
Have you ever wondered how e-mail gets from your desktop to a friend halfway around the world? What is a POP3 server, and how does it hold your mail? The answers may surprise you, because it turns out that e-mail is an incredibly simple system at its core!
What is an E-mail Message? Apparently, the first e-mail message was sent in 1971 by an engineer named Ray Tomlinson. Prior to this, you could only send messages to users on a single machine. Tomlinson's breakthrough was the ability to send messages to other machines on the Internet, using the @ sign to designate the receiving machine.
An e-mail message has always been nothing more than a simple text message, a piece of text sent to a recipient. When you send an e-mail message to a friend, you are sending a piece of text. In the beginning and even today, e-mail messages tend to be short pieces of text, although the ability to add attachments now makes many e-mail messages quite long. Even with attachments, however, e-mail messages continue to be text messages -- we'll see why when we get to attachments.
Understanding E-mail Clients You have probably already received several e-mail messages today. To look at them you use some sort of e-mail client. Examples include stand-alone software, free Web e-mail service, and e-mail service that requires payments. No matter which type of client you are using, you know that an e-mail client generally does four things:
It shows you a list of all of the messages in your mailbox by displaying the message headers. The header shows you who sent the mail and the subject of the mail, and may also show the time and date of the message and the message size.
It lets you select a message header and read the body of the e-mail message.
It lets you create new messages and send them. You type in the e-mail address of the recipient and the subject for the message, and then type the body of the message.
Most e-mail clients also let you add attachments to messages you send and save the attachments from messages you receive.
Sophisticated e-mail clients may have all sorts of bells and whistles, but at the core, this is all that an e-mail client does.
Understanding a Simple E-mail Server Given that you have an e-mail client on your machine, you are ready to send and receive e-mail. All that you need is an e-mail server for the client to connect to. Let's imagine what the simplest possible e-mail server would look like in order to get a basic understanding of the process. Then we will look at the real thing.
If you have read the How Stuff Works article entitled How Web Servers and the Internet Work, then you know that machines on the Internet can run software applications that act as servers. There are Web servers, FTP servers, telnet servers and e-mail servers running on millions of machines on the Internet right now. These applications run all the time on the server machine and they listen to specific ports waiting for people or programs to attach to the port. The simplest possible e-mail server might look like this:
It would have a list of e-mail accounts, with one account for each person who can receive e-mail on the server. My account name might be mbrain, John Smith's might be jsmith, and so on.
It would have a text file for each account in the list. So the server would have a text file in its directory named MBRAIN.TXT, another named JSMITH.TXT, and so on.
When someone wants to send me a message, the person composes a text message ("Marshall, Can we have lunch Monday? John") in an e-mail client, and indicates that the message should go to mbrain.
When the person presses the Send button, the e-mail client would attach to the e-mail server and pass to the server the name of the recipient (mbrain), the name of the sender (jsmith) and the body of the message.
The server would format those pieces of information and append them to the bottom of the MBRAIN.TXT file. The entry in the file might look like this:
From: jsmith To: mbrain Marshall, Can we have lunch Monday? John
|