Open In App
Related Articles

SMTP Commands

Like Article
Save Article
Report issue

Simple Mail Transfer Protocol (SMTP) is an ASCII protocol. It is based on client-server model. It uses TCP port number 25 for this service. Therefore e-mail; is delivered from source to destination by having the source machine established a TCP to port 25 of the destination machine. To send mail, a system must contain client MTA and to receive a mail, a system must have server MTA. SMTP transfers this message from client MTA to the server MTA. To send a mail, SMTP is used two times: one between sender and sender’s mail server and the other between the two mail servers. 

SMTP Commands : 
These commands are sent from the client to the server. Each command consists of a keyword followed by zero or more arguments. It means there are also some keywords that do not contain any argument. The format of the command is as follows : 

 Keywords : argument(s) 

There are 14 different SMTP commands which are given in the following table : 

Command form 
1.HELOHELO<SP><domain><CRLF>It provides the identification of the sender i.e. the host name.Mandatory
2.MAILMAIL<SP>FROM : <reverse-path><CRLF>It specifies the originator of the mail.Mandatory
3.RCPTRCPT<SP>TO : <forward-path><CRLF>It specifies the recipient of mail.Mandatory
4.DATADATA<CRLF>It specifies the beginning of the mail.Mandatory
5.QUITQUIT<CRLF>It closes the TCP connection.Mandatory
6.RSETRSET<CRLF>It aborts the current mail transaction but the TCP connection remains open.Highly recommended
7.VRFYVRFY<SP><string><CRLF>It is use to confirm or verify the user name.Highly recommended
8.NOOPNOOP<CRLF>No operationHighly recommended
9.TURNTURN<CRLF>It reverses the role of sender and receiver.Seldom used
10.EXPNEXPN<SP><string><CRLF>It specifies the mailing list to be expanded.Seldom used
11.HELPHELP<SP><string><CRLF>It send some specific documentation to the system.Seldom used
12.SENDSEND<SP>FROM : <reverse-path><CRLF>It send mail to the terminal.Seldom used
13.SOMLSOML<SP>FROM : <reverse-path><CRLF>It send mail to the terminal if possible; otherwise to mailbox.Seldom used
14.SAMLSAML<SP>FROM : <reverse-path><CRLF>It send mail to the terminal and mailbox.Seldom used


Last Updated : 13 Sep, 2021
Like Article
Save Article
Share your thoughts in the comments
Similar Reads