---
title: "Short note: SMTP"
subject: "Computer Networks and Security"
chapter: 6
key: "semester_7/computer_networks_and_security:smtp-note"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/smtp-note
site: BCT Engineering
---

# Short note: SMTP

Computer Networks and Security · Chapter 6: Application Layer

- Asked in: 2072 Chaitra, 4 marks
- Video: [SMTP Explained | How Email Works in Computer Networks | SMTP Tutorial for Beginners | TechTerms](https://www.youtube.com/watch?v=AcBhyCPJTEk) — TechTerms
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/smtp-note
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-6

## Question

Write a short note on Simple Mail Transfer Protocol (SMTP).

## Short answer

SMTP is a text-based push protocol for sending email over TCP port 25, using commands HELO, MAIL FROM, RCPT TO, DATA, and QUIT. It uses store-and-forward with MX records and cannot retrieve mail; retrieval is done by POP3 or IMAP.

## Answer

**SMTP (Simple Mail Transfer Protocol, RFC 5321)** is the Internet standard application-layer protocol for **sending** email. It works over TCP, port 25 (587 for client submission, 465 for SMTP over TLS). It is a **push** protocol: the client pushes the mail to the server, which pushes it on to the next server until it reaches the recipient's mail server.

#### Features
- Text-based, commands in 7-bit ASCII, replies with 3-digit codes (250 OK, 354 start mail input, 550 mailbox unavailable).
- Persistent TCP connection, store-and-forward model.
- Only transfers mail; retrieving uses POP3/IMAP.

#### Stages
1. **Connection setup:** TCP handshake, server sends 220 greeting.
2. **Handshake:** HELO/EHLO.
3. **Transfer:** MAIL FROM, RCPT TO, DATA (header + body, ends with a line containing only ".").
4. **Close:** QUIT.

```text
Sender UA --> MTA (client) ===SMTP===> MTA (server) --> Mailbox
```

SMTP uses the receiving domain's **MX record** (found through DNS) to find the destination server. MIME is used to carry attachments and non-ASCII text.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which port is used for SMTP between servers?
   A. 25
   B. 110
   C. 143
   D. 53
   Answer: A. SMTP uses TCP 25 (587 submission). (Key point: Ports)

2. How is the end of the mail body signalled in DATA?
   A. A line containing only a dot
   B. QUIT
   C. A blank line
   D. FIN
   Answer: A. The DATA body ends with a line containing only '.'. (Key point: Message end)

3. How does SMTP find the destination server?
   A. MX record via DNS
   B. ARP
   C. DHCP
   D. POP3
   Answer: A. The domain's MX record gives the mail server. (Key point: MX)

## Related in Computer Networks and Security

- [Sending images over 7-bit ASCII SMTP](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Asmtp-images-mime) — Computer Networks and Security, chapter 6

## Related in other subjects

- [Web-mail to POP3 message transfer protocols](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aalice-bob-email-protocols) — Internet and Intranet, chapter 3
- [Simple Rankine plant 2 MPa / 20 kPa: efficiency, power](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Arankine-2mpa-20kpa-50kgs) — Fundamental of Thermodynamics & Heat Transfer, chapter 6
