Like most TCP-based protocols, SMTP uses 7-bit ASCII characters for most of its functionality. The SMTP protocol is made up of commands that are nothing more than ASCII strings like "MAIL FROM:" and "RCPT TO:". By using 7-bit ASCII characters and commands, SMTP takes a lowest-common-denominator approach to the problem of cross- platform compatibility, allowing the protocol to be implemented across a wide variety of systems. Any platform that can generate 7-bit ASCII characters can run an SMTP client or server. Refer to section B.5.4 Application Linguistics for more information on this subject.
The commands such as "MAIL FROM:" are only used by the SMTP client during a mail transfer session. The SMTP server that is receiving the mail messages issues numeric response codes such as "250" and the like. These response codes can be followed by any ASCII characters or strings (such as "OK"), although these strings are ignored by the SMTP client. The numeric response code is all it cares about. Additionally, the client must wait for a valid response code before issuing any more commands.
This full-duplex, bi-directional exchange is the essence of the SMTP protocol. Figure D.1 below shows an example SMTP dialog used for creating an e-mail message, using Windows 95's Telnet client application connected to Greywolf, which is running an SMTP server:
|
The client sends textual commands such as "mail from:" and "quit" while the server responds with numeric codes that indicate success, failure, or a detailed result, although any textual message may follow the numeric code. For example, the code "250" means "OK", although there are several different text messages following the "250" status message. The text strings following the numeric status codes exist for the benefit of humans, and are ignored by the client.
For more information on SMTP commands, refer to section D.2.1.1 Common SMTP Commands. For more information on SMTP response codes, refer to section D.2.1.2 Common SMTP Response Codes.
Copyright © 1997, Unoverica Corporation. All rights reserved. Unauthorized use prohibited.
Send comments to docs@unoverica.com