0% found this document useful (0 votes)
85 views3 pages

SMTP

Uploaded by

Farah Wahsh
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)
85 views3 pages

SMTP

Uploaded by

Farah Wahsh
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/ 3

What is SMTP?

● Definition: SMTP (Simple Mail Transfer Protocol) is a protocol used to send


emails over the Internet. It's part of the application layer of the TCP/IP
(Transmission Control Protocol/Internet Protocol) suite.
● Purpose: Enables the transfer of emails between email clients (like Gmail or
Outlook) and servers, as well as between servers.
● It’s the backbone of email communication.

How SMTP Works:


When a user clicks the send button in their email client, a Transmission Control
Protocol (TCP) connection is established that links to an SMTP server -- or a
connection between the email server and the email client.

1. Email Composition:
○ Imagine you're sending an email to your friend. You type the message
in Gmail or Outlook and hit Send.
2. Connection to SMTP Server:
○ The client connects to an SMTP server to send the email.
○ Your email app (like Gmail) talks to an SMTP server (think of it as the
post office for emails).
○ It uses a command like HELO to introduce itself.
3. Mail Transfer Process:
○ The email is sent to the recipient's email server, following the protocol's
rules.
○ The SMTP server takes your email, checks the recipient's address, and
decides where to send it next.
○ If your friend uses a different email provider (e.g., Yahoo), the server
connects to Yahoo's SMTP server to deliver the email.
4. Recipient Access:
○ The recipient retrieves the email via other protocols like IMAP (Internet
Message Access Protocol) and places it in the recipient’s inbox.
○ Once the email reaches Yahoo’s server, it’s stored there until your
friend logs in to check their inbox using IMAP
SMTP Commands:

SMTP uses a set of commands and responses for communication:

● HELO: Identifies the sender's SMTP server.


● MAIL FROM: Specifies the sender's email address.
● RCPT TO: Specifies the recipient's email address.
● DATA: Indicates the start of the email content (body and attachments).
● QUIT: Ends the SMTP session.

Key Features of SMTP

1. Store-and-Forward Mechanism:
○ SMTP stores emails temporarily on a server if the recipient's server
isn’t available and retries later.
○ Example: If Yahoo’s email server is down, Gmail’s SMTP server will
keep retrying until it’s back online.
2. Relaying Emails:
○ SMTP can relay emails across multiple servers to get them to their
destination.
○ Example: You send an email from Gmail to a friend using Yahoo.
Gmail’s server might pass it through a few servers before it reaches
Yahoo.
3. Error Handling:
○ If there’s a problem, SMTP returns an error message.
○ Example: If you send an email to the wrong address, SMTP will tell
you, "Email address not found."
Limitations of SMTP

1. No Built-In Security:
○ By default, SMTP doesn’t encrypt emails. Anyone intercepting the
message can read it.
○ Example: Sending sensitive information like passwords or bank details
without encryption could expose it to hackers.
○ Enhancement: STARTTLS: Encrypts the communication between the
email client and server.
2. Can’t Handle Attachments or Rich Content:
○ SMTP was originally designed for plain text. To send images, videos, or
formatted text, we need MIME (Multipurpose Internet Mail Extensions).
○ Example: If you attach a picture to an email, MIME converts it so
SMTP can handle it.
3. Server-Specific Issues:
○ Some email servers block Port 25 (default SMTP port) to prevent
spam.
○ Example: If you’re using an older mail setup, you might face trouble
sending emails until you switch to a secure port like 587.

What’s a Port?

● A port is like a doorway that allows communication between devices on a network.


● SMTP uses certain ports to send emails:
○ Port 25 (the default, used historically).
○ Port 587 (modern, secure option).

The Problem with Port 25:

● Port 25 is often blocked by internet service providers (ISPs) or email hosting


providers.
● Why? It’s the default SMTP port, and spammers abuse it to send junk emails in
bulk.
● By blocking Port 25, providers reduce the risk of spam being sent from their
networks.

What Happens if Port 25 is Blocked?

● If your email server is set up to use Port 25 but your ISP blocks it, emails won’t be
sent, and you’ll get errors like “Connection Timed Out” or “Unable to Send
Email”.

The Solution:

● Switch to Port 587, which is used for secure email transmission with encryption
(STARTTLS).
● Most modern email systems already default to using Port 587.

You might also like