SIMPLE MAIL TRANSFER PROTOCOL

The objective of Simple Mail Transfer Protocol (SMTP) is to transfer mail reliably and efficiently.Mail is an application or use of interprocess communication.Mail can be communicated between processes in different IPCEs by relaying through a process connected to two (or more) IPCEs. More specifically, mail can be relayed between hosts on different transport systems by a host on both transport systems.

As the result of a user mail request, the sender-SMTP establishes a full-duplex transmission channel to a receiver-SMTP. The receiver-SMTP may be either the ultimate destination or an intermediate. SMTP commands are generated by the sender- SMTP and sent to the receiver-SMTP. SMTP replies are sent from the receiver-SMTP to the sender-SMTP in response to the commands.

HELLO (HELO)
This command is used to identify the sender-SMTP to the receiver-SMTP. The argument field contains the host name of the sender-SMTP
HELO <SP> <host> <CRLF>

MAIL
There are three steps to a SMTP mail transaction. The transaction is started with a MAIL command which gives the sender identification.
MAIL <SP> FROM:<reverse-path> <CRLF>

RCPT RCPT <SP> TO:<forward-path> <CRLF>
This command gives a forward-path identifying one recipient.a forward-path identifying one recipient.

DATA
DATA <CRLF>
SMTP indicates the end of the mail data by sending a line containing only a period.

FORWARDING
User not local; will forward to <forward-path>
User not local; please try <forward-path>

VERIFYING AND EXPANDING
For the VRFY command, the string is a user name, and the the response may include the full name of the user and must include the mailbox of the user.
For the EXPN command, the string identifies a mailing list, and the multiline response may include the full name of the users and must give the mailboxes on the mailing list.

SENDING AND MAILING
The delivery to the user's mailbox is called "mailing", the delivery to the user's terminal is called "sending".
SEND,SOML(send or mail),SAML(sand and mail)

OPENING AND CLOSING
At the time the transmission channel is opened there is an exchange to ennsure that the hosts are communicating with the hosts they think they are.

RELAYING:-Routing of the mail

HELP
This command causes the receiver to send helpful information to the sender of the HELP command.

QUIT
This command specifies that the receiver must send an OK reply, and then close the transmission channel. QUIT <CRLF>

SIZES OF VARIOUS COMMANDS
There are several objects that have required minimum maximum sizes. That is every implementation must be able to receive objects of at least these sizes, but must not send objects larger than these sizes.
user :- The maximum total length of a user name is 64 characters.
host :-The maximum total length of a host name or number is 40 characters.
path :-The maximum total length of a reverse-path or forward-path is 256 characters. (including the punctuation and element separators)
command line :-The maximum total length of a command line including the command word and the <CRLF> is 512 characters.
reply :- line The maximum total length of a reply line including the reply code and the <CRLF> is 512 characters.
text line :- The maximum total length of a text line including the <CRLF> is 1000 characters (but not counting the leading dot duplicated for transparency).
recipients buffer :-The maximum total number of recipients that must be buffered is 100 recipients.

For more details on SMTP refer RFC-821