What is SMTP?

SMTP (simple mail transfer protocol) is an application layer protocol that is used to send emails from the sender’s mail server to the receiver’s mail server.

Steps

Suppose that person AA wants to send an email to person BB. The steps involved in this email transfer are:

  1. AA composes an email on their user-agent (e.g., Outlook) and adds the recipient’s email address.

  2. AA's user-agent sends the email to AA's mail server.

  3. The SMTP client process on AA's mail server opens a connection with the SMTP server process on BB's mail server by establishing a TCP connection on port 25 and conveying information (e.g., the sender’s email address and the receiver’s email address) to BB's mail server during handshaking.

  4. The SMTP client process on AA's mail server sends the email to the SMTP server process running on BB's mail server. Upon reception, the email is placed in BB's mailbox.

  5. BB can now pull the email from their mail server using a protocol like POP3 or IMAP.​

Person A sends an email to Person B
Person A sends an email to Person B
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved