0% found this document useful (0 votes)
51 views6 pages

SMPT

The document provides an overview of the Simple Mail Transfer Protocol (SMTP), detailing its role in email communication through message transfer agents (MTAs). It outlines the commands and responses used in SMTP, the phases of mail transfer including connection setup, mail transfer, and connection termination. Additionally, it includes references for further reading on the topic.

Uploaded by

rajputtani85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views6 pages

SMPT

The document provides an overview of the Simple Mail Transfer Protocol (SMTP), detailing its role in email communication through message transfer agents (MTAs). It outlines the commands and responses used in SMTP, the phases of mail transfer including connection setup, mail transfer, and connection termination. Additionally, it includes references for further reading on the topic.

Uploaded by

rajputtani85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

BANGALORE U NIVERSITY

U NIVERSITY V ISVESVARAYA C OLLEGE OF E NGINEERING


D EPARTMENT OF C OMPUTER S CIENCE AND E NGINEERING
A LTERNATIVE A SSESSMENT T OOL (AAT)
Name of the Candidate: Amruta veerendra Pattar
Register No: 20GACS4002
Program: M.Tech (COMPUTER NETWORKING)
Course: TCP/IP PROTOCOLS
Topic: Simple Mail Transfer Protocol(SMTP)

Introduction
The actual mail transfer is done through message transfer agents (MTAs). To send mail, a system
must have the client MTA, and to receive mail, a system must have a server MTA. The formal protocol
that defines the MTA client and server in the Internet is called Simple Mail Transfer Protocol (SMTP).
As we said before, two pairs of MTA clientserver programs are used in the most common situation
(fourth scenario). SMTP is used two times, between the sender and the sender’s mail server and
between the two mail servers. As we will see shortly, another protocol is needed between the mail
server and the receiver. SMTP simply defines how commands and responses must be sent back and
forth. Each network is free to choose a software package for implementation.

Figure 1: This is an image from a text that uses color to teach music.

1
Commands and Responses
SMTP uses commands and responses to transfer messages between an MTA client and an MTA
server. Each command or reply is terminated by a two-character (carriage return and line feed) end-
of-line token.

Figure 2: SMTP commands and responses.

Commands
Commands are sent from the client to the server.

Keyword: argument(s)
keyword are followed by zero or more arguments. SMTP defines 14 commands listed in Table.

Figure 3: SMTP Commands.

Responses
Responses are sent from the server to the client. A response is a three-digit code that may be
followed by additional textual information. The idea is the same as discussed in the case of HTTP
responses.

2
Figure 4: SMTP Responses.

Mail Transfer Phases


The basic SMTP operation occurs in three phases:
1. Connection set up
2. Mail transfer
3. Connection termination

Connection set up/ Connection establishment


An SMTP sender will attempt to set up a TCP connection with a target host when it has one or more
mail message to deliver to that host. The following sequence occurs during connection setup:

1. The sender opens a TCP connection with the receiver.

2. Once the connection is established, the receiver identifies itself with ”220 Service Ready”.

3. The sender identifies itself with the HELO command.

4. The receiver accepts the sender’s identification with “250 ‘OK”.

5. If the mail service on the destination is not available, the destination host returns a “421 Service
Not Available” reply in step 2 and the process is terminated

3
Figure 5: Connection establishment.

Mail transfer
After connection has been established between the SMTP client and server, a single message between
a sender and one or more recipients can be exchanged. This phase involves eight steps. Steps 3 and 4
are repeated if there is more than one recipient

1. The client sends the MAIL FROM message to introduce the sender of the message. It includes
the mail address of the sender (mailbox and the domain name). This step is needed to give the
server the return mail address for returning errors and reporting messages.

2. The server responds with code 250 or some other appropriate code.

3. The client sends the RCPT TO (recipient) message, which includes the mail address of the
recipient.

4. The server responds with code 250 or some other appropriate code.

5. The client sends the DATA message to initialize the message transfer.

6. The server responds code 354 (start mail input) or some other appropriate message.

7. The client sends the contents of the message in consecutive lines. Each line is terminated by a
two-character end-of-line token (carriage return and line feed).

8. The message is terminated by a line containing just one period.

9. The server responds with code 250 (OK) or some other appropriate code

4
Figure 6: Mail transfer.

Connection termination
After the message is transferred successfully, the client terminates the connection. This phase involes
two steps.

1. The client sends the QUIT command.

2. The server responds with code 221 or some other appropriate code.

3. After the connection termination phase, the Tcp connection must be closed.

Figure 7: Connection termination.

References
[1]Behrouz A. Forouzan, “TCP/IP Protocol Suite”, IV Edition, McGraw Hill, 2010.

5
[2] https://en.wikipedia.org/wiki/Simple mail transfer protocol
[3] https://ecomputernotes.com/smtp-simple-mail-transfer-protocol

Signature of the Candidate

You might also like