Email

  1. Home
  2. Computing & Technology
  3. Email

SMTP Inside Out

How internet email works (cont.)

By Heinz Tschabitscher, About.com

Let's Go!

The toolbar button says "Go!" and the email starts its journey. But how?

Heinz Tschabitscher

The Message

Now that the "envelope" is finished, the data of the email message just as it is can follow. This "data" consists of the email's body as well as the header fields.

The command to initiate the state that makes the server accept the message is DATA. Following this are all the header fields of the email message and then the body, both making up for just one big block of text (or data). To tell the server that the input is finished a dot on a line by itself is used (\r\n.\r\n). So I send my message:

DATA
354 Enter mail, end with "." on a line by itself
Message-ID: <kllsd0817184815.33912@larose>
Date: Sun, 17 Aug 1997 18:48:15 +0200
From: Heinz Tschabitscher <sender@example.com>
To: Heinz Tschabitscher <recipient@example.com>
Subject: For the Summarize-Proust Contest

Off to Swan's World!
.

250 SAA19153 Message accepted for delivery

Yes, this means that you can state a name completely different from the one the email goes to in the To: field. For example, you can use "Recipient list suppressed" <nobody@nowhere.no>.

The End

You can now send as many emails as you wish repeating the steps from MAIL FROM: to .. If you're done with that, you may quit the server with the QUIT command and that's just what we do:

QUIT
221 Goodbye

How Can I do This?

The non-trivial solution is to telnet to your outgoing mail server (you can find its address in your email client's account settings) on port 25.

  • Open a command prompt.
  • Type "telnet <mail server> 25".
  • Talk to the server using SMTP.

The easier way is to use this Java applet, which tries to imitate the SMTP protocol and guides you through the dialog.

Explore Email

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Email

  1. Home
  2. Computing & Technology
  3. Email
  4. How Email Works
  5. SMTP Inside Out - How Internet Email Works - About Email

©2009 About.com, a part of The New York Times Company.

All rights reserved.