Skip to content

SMTP

Simple Mail Transfer Protocol

Medium — good to knowNetworking

ELI5 — The Vibe Check

SMTP is the protocol email uses to leave your device and travel to the recipient's mail server. It's like the postal service for email — it handles sending and routing but NOT receiving. To receive email, you use IMAP or POP3.

Real Talk

SMTP is a TCP-based application-layer protocol for sending email. It operates on port 25 (server-to-server), 587 (client submission with STARTTLS), or 465 (SMTPS with TLS). SMTP handles outgoing mail routing between mail servers via MX record lookups.

Show Me The Code

// Send email via SMTP in Node.js (using nodemailer)
const nodemailer = require('nodemailer');
const transporter = nodemailer.createTransport({
  host: 'smtp.gmail.com',
  port: 587,
  secure: false,
  auth: { user: 'you@gmail.com', pass: 'password' }
});
await transporter.sendMail({
  from: 'you@gmail.com',
  to: 'them@example.com',
  subject: 'Hello!',
  text: 'Working SMTP!'
});

When You'll Hear This

"Configure the SMTP server to send transactional emails." / "SMTP port 25 is blocked by most ISPs to prevent spam."

Made with passive-aggressive love by manoga.digital. Powered by Claude.