0
HomeDefinitionsSMTP - Simple Mail Transfer Protocol: Definition and Uses

SMTP – Simple Mail Transfer Protocol: Definition and Uses

In a TCP/IP network, this protocol manages the sending of emails between different servers. It is also used for sending mails from client computers.

SMTP stands for “Simple Mail Transfer Protocol” and is a standard communication protocol. It is mainly used for transferring electronic mail from one server to another.



SMTP Overview

When sending an e-mail, the SMTP server plays the role of sender. It recovers the email written in an Outlook-type email software or in a webmail, and transfers it to the recipient via a succession of servers (SMTP relays).

When an Internet user sends an e-mail to a friend, the e-mail server of his access provider plays the role of relay with other SMTP servers to the recipient.

Popularized in the early 1980s, SMTP works on most email clients today. Note that it does not allow, as is the case for the IMAP or POP standard, remote retrieval of emails in a mailbox on a server.
On a technical level, the SMTP uses the TPC protocol (Transmission Control Protocol) for the transfer of data. There are also similar e-mail protocols and systems such as IMAP and POP3.

SMTP works as;

  • Simple mail forwarding protocol
  • The simple mail transfer protocol acts when sending an email by transferring it from one server to another.
  • The simple mail transfer protocol acts when an email is sent by transferring it from one server to another.

Here is an overview of SMTP server addresses and SMTP ports for some of the email providers:

email provider SMTP server address Port SMTP
Yahoo smtp.mail.yahoo.com 587
GMX mail.gmx.net 587
Free smtp.free.fr 587
Gmail smtp.gmail.com 587 (TLS/STARTTLS), 465 (SSL)

How does an SMTP session work?

The interaction between SMTP client and SMTP server mentioned in the first step of the SMTP procedure represents the actual SMTP session.

The rest of the SMTP procedure, i.e. the transfer of email via SMTP from the server to the recipient, is covered in a separate article. Each session consists of a sequence of SMTP commands from the client and responses in the form of status codes from the server.


SMTP Commands Overview

According to the applicable SMTP specifications, each network protocol implementation must support at least the following eight commands consisting of 7-bit ASCII characters:

SMTP Command Signification
HELO “Hello” – The client logs in with their computer name and starts the session with it.
MAIL FROM The client names the sender of the email.
RCPT TO “Recipient” – The customer names the recipient of the email.
DATA The client initiates the transmission of the email.
RSET The client interrupts the initiated transmission, but maintains the connection between client and server.
VRFY/EXPN “Verify”/ “Expand” – The client verifies if a mailbox is available for the transmission of the message.
NOOP The client requests a response from the server to avoid a disconnect due to a timeout.
QUIT The client ends the session.

Overview of server status codes

 

SMTP responses
Status Code Meaning
200 (nonstandard success response, see rfc876)
211 System status, or system help reply
214 Help message
220 <domain> Service ready
221 <domain> Service closing transmission channel
250 Requested mail action okay, completed
251 User not local; will forward to <forward-path>
252 Cannot VRFY user, but will accept message and attempt delivery
354 Start mail input; end with <CRLF>.<CRLF>
421 <domain> Service not available, closing transmission channel
450 Requested mail action not taken: mailbox unavailable
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command parameter not implemented
521 <domain> does not accept mail (see rfc1846)
530 Access denied (???a Sendmailism)
550 Requested action not taken: mailbox unavailable
551 User not local; please try <forward-path>
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
554 Transaction failed

Published Date:

Mehmet is one of the administrator of Teknonel. As a software developer, he loves to share his knowledge in related topics. He is highly familiar with the editorial process from the inception of an article idea, through the iterative process, publishing, and performance analysis as well as product reviews.

Popular in This Category

Related Articles