A Complete List of SMTP Commands and What They are Used For

Posted in Uncategorized

Like it? Share it!

A Complete List of SMTP Commands

One cannot send an email without using SMTP; it is the universal standard that is used to send electronic mail from one system to another. However, because of email providers’ tendency to isolate users from the actual procedure involved, users find it difficult to configure or troubleshoot SMTP on their systems. Techspirited provides the complete list of commands that are associated with SMTP.

The Basics…

SMTP, or Simple Mail Transfer Protocol, is the intrinsic application-layer protocol used by any email program to send emails from one computer to another. It runs the TCP/IP architecture, and uses the system’s port 25 by default. SMTP is involved in transporting email messages from the sender’s own computer (or more specifically, the email client software), to the email server, which is located on a remote computer. The server then forwards the message to the recipient’s email server, again using this protocol. The role of SMTP ends here.

To receive mail (i.e., to download it from one’s email server), a different protocol, such as POP3 (Post Office Protocol) or IMAP (Internet Mail Access Protocol) is used.

Email is soon becoming one of the most indispensable luxuries available to us as a result of modern technology, one study has found that upwards of 2 billion people use email! But did you know, that irrespective of what web-based email, or internet service provider-based email account you use, the underlying principle of email worldwide is predominantly the same and they use similar protocols? In fact, even though browser-based email titans like Gmail, Hotmail, Yahoo! and the like, use proprietary protocols to send and receive emails on their servers, if they wish to communicate with other companies’ servers, they too need to employ SMTP. Whereas, email client software such as Eudora, and Outlook, completely use SMTP to push their outgoing mail from the client’s computer to their servers, and further to the recipient’s email server.

When you have Google, Yahoo!, Microsoft, or some other big name to look after the smooth functioning of your email application, do you even need to learn the intricacies of SMTP? Yes you do. If you log in to your email account and send an email, you obviously do not need to possess any knowledge about SMTP commands. But consider any of the following scenarios.

☛ You want to configure SMTP on your computer or network.

☛ You are facing problems with the email service from inside a local network, which could be because of one of many possible issues, and needs troubleshooting.

☛ Simply for the purpose of testing connectivity, you wish to contact your email server.

☛ You wish to access email when you are in the middle of a Telnet session.

☛ You are trying to send or receive an email from inside the Linux shell.

In these cases, being well-versed with SMTP commands is a must. The good news is, there aren’t too many commands, and they are very easy to remember.

The complete description of SMTP, along with a full list of commands, was first released in RFC 821, in 1982. Later, the functionality of SMTP was extended to allow sharing of multimedia files, like pictures, audio files, and videos, and ESMTP (Extended Simple Mail Transfer Protocol) was developed. This protocol was described in detail in RFC 5321, and contains some additional commands.

List of SMTP Commands

★ All these commands can be typed into a terminal/command prompt.

★ SMTP commands are not case-sensitive, hence their capitalization is optional for the user.

★ The following list encompasses both SMTP as well as ESMTPcommands.

S. No. Command Description
1 ATRN This command performs the TURN operation (reversal of roles of email client and server) only if the connection is authenticated.
2 CHUNKING This is an ESMTP command, whose function is similar to DATA (a message sent by the client to the server to start the process of sending the email), except that the mechanism used by the server to figure out where the message ends is different; the number of bytes in the message is explicitly sent, and the server counts the number of bytes it has received.
3 DATA This command gives the server an intimation that it is ready to begin sending the email.
4 DSN This command activates the reception of delivery status notifications of the email message.
5 EHLO An email client that supports ESMTP sends this command, and the server returns a list of ESMTPcommands that it supports. The syntax of this command requires the sender to provide his or her own domain name as a parameter.
6 ETRN This command is sent by an email server to another server, requesting it to start sending email messages located on it.
7 HELP This command is used to ask for help from the email server, and it requests the server to return a list of commands it supports.
8 HELO To begin an SMTP session between the sender and the server, and also so as to enable the server to be able to identify the sender, this command is sent. The syntax of this command requires the sender to send his or her domain name as a parameter.
9 MAIL FROM: To begin the process of composing the email, and to allow the server to know the sender’s identity, this command is used, and its syntax requires it to compulsorily take the sender’s email address as a parameter, along with other optional parameters.
10 NOOP This command performs no operation, and is used solely to verify the connectivity with the server.
11 PIPELINING On a terminal or command prompt, response packets for every action performed are immediately visible to the sender. This command turns on pipelining, which allows one to send more than one command at a time before receiving responses.
12 QUIT This command is used to terminate the SMTPsession.
13 RCPT TO: The syntax of this command requires the recipient’s email address to be provided as a compulsory parameter, in addition to other optional ones. It is used to specify the recipient of the email message.
14 RSET This command is used to perform a reset action; the current conversation is terminated, or message being composed discarded, and one can start again.
15 SAML This command asks the server to send the message to the recipient’s email client, as well as directly to the recipient’s terminal.
16 SEND This command is used to send email messages directly to the recipient’s terminal, instead of sending it to his or her email client.
17 SIZE= This command is used to specify the size of the message being sent, in terms of number of bytes. It comes into use when the server has set a limitation on the size of incoming email messages. In the absence of this explicit declaration of the size of the message, the server tries to determine the same by using other methods.
18 SOML This command sends emails directly to the recipient’s terminal if he or she is online. Otherwise, the message is sent to the recipient’s email client.
19 TURN This command is used to invert the functionality of the email client, and the email server. The client can receive messages from the server while using the same connection.
20 VRFY In the syntax of this command, the recipient’s email address is taken as a parameter. This command requests the email server to verify the authenticity, or existence, of the remote user from the email address.

Of the commands listed above, some are more specific to certain platforms, for example, Sendmail―the proprietary email application for Unix systems, while others are not very commonly used nowadays, albeit still valid. In some cases, clients or servers may not support ESMTP, or else access may be restricted. In all circumstances, one can always type the HELP command in the beginning of the session, so as to be sure of which commands are supported and which are not.

Get Updates Right to Your Inbox

Sign up to receive the latest and greatest articles from our site automatically each week (give or take)...right to your inbox.
Blog Updates