• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » Networking » Services » SMTP – Simple Mail Transfer Protocol (SMTP)
Next →
← Prev

SMTP – Simple Mail Transfer Protocol (SMTP)

By Dinesh Thakur

SMTP stands for Simple Mail Transfer Protocol. It is a TCP/IP protocol that specifies how computers exchange electronic mail. It works with post office protocol (POP).

SMTP is used to upload mail directly from the client to an intermediate host, but only computers constantly connected such as Internet Service Providers (ISP) to the Internet can use SMTP to receive mail. The ISP servers then offload the mail to the users to whom they provide the Internet service.

SMTP uses TCP port number 25 for his service. Therefore e-mail is delivered from source to destination by having the source machine established a TCP connection to port 25 of the destination machine.

To send a mail, a system must have a client MTA, and to receive a mail, a system must have a server MTA. SMTP transfers this message from client MTA to server MTA. SMTP uses commands and responses to transfer the message between an MTA client and MTA server In order to send a mail, SMTP is used two times: one between the sender and the sender’s mail server, and the other between the two mail servers.

Each command or response ends with two characters (CR and LF) CR stands for Carriage Return and LF stands for Line Feed.

Windows NT Option Pack 4 includes an SMTP mail client so do the Windows NT Resource Kit. Microsoft Exchange Server will route your LAN mail on and off the Internet.

Working of SMTP: SMTP is a simple ASCII protocol that is based on client-server model. After establishing the TCP connection, the sending machine, operating as the client, waits for the receiving machine, operating as the server, to talk first. The server starts by sending a line of text giving its identity and telling whether or not it is prepared to receive mail. If it is not, the client releases the connection and tries again later.

If the server is willing to accept e-mail, the client announces whom the e-mail is coming from and destination, the server gives the client the go ahead to send the message. Then the client sends the message and the server acknowledges it.

The problems that may arise with SMTP protocol are as follows:

Some older version of SMTP implementations cannot handle messages exceeding 64KB.

If the client and server have different timeouts, one of them may give up while the other is still busy, unexpectedly terminating the connection.

To get around these problems, extended SMTP (ESMTP) has been defined in RFC 1425.

We’ll be covering the following topics in this tutorial:

  • SMTP Commands
  • SMTP Responses
  • Mail Transfer Phases

SMTP Commands

• SMTP commands are sent from the client to the server.

• Each command consists of a keyword or command name followed by zero or more argument. It means some keywords do not contain any argument.

• The format of command is:

Keyword: argument(s)

• There are 14 different SMTP commands listed in the table below:

SMTP Responses

• SMTP responses are sent from server to client.

• Each response begins with a three digit code and may be followed by additional textual information.

• The leading digits indicate the category of the response.

The difference categories of response are:

1. Positive completion reply. It indicates that the requested action has been successfully completed. A new request may be initiated.

2. Positive Intermediate reply. It indicates that the command has been accepted, but the requested action is being held in abeyance, pending receipt of further information.

3. Transient Negative Completion reply. It indicates that the command was not accepted and the requested action did not occur. However, the error condition is temporary and the action may be requested.

4. Permanent Negative Completion reply. It indicates the command was not accepted and the requested action did not occur.

The various SMTP responses are listed in the table below:

Mail Transfer Phases

The basic SMTP operation occurs in three phases:

1. Connection set up

2. Mail transfer

3. Connection termination

Connection Setup

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.

Mail transfer

• Once the connection has been established, the SMTP sender may send one or more messages to the SMTP receiver.

• There are three logical phases to the transfer of a message :

1. A MAIL command identifies the originator of the message.

2. One or more RCPT commands identify the recipients of this message.

3. A DATA command transfers the message text.

Connection termination

• The SMTP sender closes the connection in the following manner:

1. The sender sends a QUIT command and waits for a reply.

2. Sender initiates TCP close operation for the TCP connection.

3. The receiver initiates its TCP close after sending is reply to the QUIT command.

You’ll also like:

  1. What is HTTP (Hypertext Transfer Protocol)?
  2. File Transfer Protocol (FTP)
  3. NNTP – Network News Transfer Protocol
  4. Simple Network Management Protocol (SNMP)
  5. TFTP – Trivial File Transfer Protocol (TFTP)
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

Internet

Internet Terminology

    • Internet - Home
    • Internet - Email
    • Internet - www
    • Internet - Telnet
    • Internet - Architecture
    • Internet - FTP
    • Internet - HTTP
    • Internet - MIME
    • Internet - SMTP
    • Internet - DNS
    • Internet - POP3
    • Internet - Intranet
    • Internet - SNMP
    • Internet - BOOTP
    • Internet - TFTP
    • Internet - URL
    • Internet - NAT
    • Internet - DHCP
    • Internet - Cellular Radio
    • Internet - VSAT
    • Internet - TCP/IP Services
    • Internet - IMAP4
    • Internet - GSM Architecture
    • Internet - VOIP
    • Internet - GSM Features
    • Internet - SSL
    • Internet - Web Server
    • Internet - File Server
    • Internet - NNTP
    • Internet - UUCP
    • Internet - ADSL
    • Internet - FTP
    • Internet - NFS
    • Internet - Videoconferencing
    • Internet - Audio Compression
    • Internet - xDSL
    • Internet - ADSL Protocols
    • Internet - HTTP Cookie
    • Internet - Wireless Principles
    • Internet - X.400
    • Internet - IP Standardization
    • Internet - 4G
    • Internet - CompuServe
    • Internet - Anonymous FTP
    • Internet - File Sharing
    • Internet - WRAN
    • Internet - FQDN
    • Internet - CNAME
    • Internet - Buffering
    • Internet - Cluster Computing
    • Internet - WiMAX
    • Internet - Client/Server
    • Internet - ATM
    • Internet - DSL
    • Internet - GPRS
    • Internet - Transfer rate
    • Network - Cable Modem

Network Server Technique

    • Server - Home
    • Server - Proxy
    • Server - BBS
    • Server - B Channel
    • Server - Process
    • Server - AAL
    • Server - ISDN Features
    • Server - Multicasting
    • Server - Client/Server Benefits
    • Server - Client process
    • Server - Ad-Hoc
    • Server - ISDN Interfaces
    • Server - Guided Transmission
    • Server - SONET
    • Server - ISDN Standards
    • Server - WAP
    • Server - Broadband ISDN

Networking Encryption System

    • Security - Firewall
    • Security - Cryptography
    • Security - Firewall Architectures
    • Security - Network Security Services
    • Security - VPN
    • Security - Security Threats
    • Security - Encryption
    • Security - SHA-1
    • Security - Requirements
    • Security - Digital Signatures
    • Security - Message Authentication
    • Security - MD5
    • Security - Tunneling (VPN)
    • Security - Remote Access Security

Some Other Tutorials

  • Tutorials - QOS
  • Tutorials - CTS
  • Tutorials - LTE
  • Tutorials - CDDI
  • Tutorials - AppleTalk
  • Tutorials - EtherTalk
  • Tutorials - Flooding
  • Tutorials - Tunneling
  • Ethernet - Frame
  • Ethernet - Expansion
  • Ethernet - 10 Mbit/s
  • Ethernet - Local Loop
  • Broadband vs Baseband
  • Wi-Fi vs. Mobile Broadband
  • Optical Source
  • Implementation Wireless Technology
  • Applications of Wifi
  • Wireless Router Installation
  • Networking Your Devices
  • Type of Wi-Fi equipment
  • Multi-point Architectures
  • Frame-level Architecture
  • Circuits, Channels and Multichanneling
  • Single Bit Error Vs Burst Error

Other Links

  • Internet Terminology - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW