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 providerSMTP server addressPort SMTP
Yahoosmtp.mail.yahoo.com587
GMXmail.gmx.net587
Freesmtp.free.fr587
Gmailsmtp.gmail.com587 (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 CommandSignification
HELO“Hello” – The client logs in with their computer name and starts the session with it.
MAIL FROMThe client names the sender of the email.
RCPT TO“Recipient” – The customer names the recipient of the email.
DATAThe client initiates the transmission of the email.
RSETThe 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.
NOOPThe client requests a response from the server to avoid a disconnect due to a timeout.
QUITThe client ends the session.

Overview of server status codes

 

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