Course contentsShow
← System Design
Lesson 1686 of 1,91941. Real-World System: Notification SystemFree lesson

Email Notifications

Email delivery architecture using SMTP and services like SendGrid, including bounce handling and reputation management.

Email Notifications

What you'll learn: How modern notification systems deliver emails at scale using SMTP, third-party services, and reputation management.

Why Email Delivery Is Complex

Sending an email sounds simple—just fire off a message, right? In reality, at scale you're battling spam filters, managing delivery infrastructure, handling bounces, and protecting your domain's sender reputation. Unlike SMS (previous lesson), email has layered complexity around deliverability.

SMTP and Delivery Services

SMTP (Simple Mail Transfer Protocol) is the foundational protocol for sending email. While you could run your own SMTP server, modern systems use specialized services like SendGrid, Amazon SES, or Mailgun that handle the heavy lifting:

  • Dedicated IP pools with pre-warmed reputation
  • Automatic retry logic for temporary failures
  • Built-in bounce and complaint handling
  • Delivery analytics and open/click tracking

These services abstract away the complexity of maintaining mail server infrastructure and dealing with ISP-specific quirks.

Bounce Handling

Emails can fail in two ways:

Hard bounces (permanent): Invalid address, domain doesn't exist
Soft bounces (temporary): Mailbox full, server temporarily down

Your system must:

  1. Parse bounce notifications (via webhook or email)
  2. Stop retrying hard bounces immediately
  3. Retry soft bounces with exponential backoff
  4. Suppress hard-bounced addresses from future campaigns

Reputation Management

Email deliverability lives or dies by sender reputation. ISPs track:

  • Bounce rates (keep below 2%)
  • Spam complaint rates (target <0.1%)
  • Engagement metrics (opens, clicks)
  • Domain authentication (SPF, DKIM, DMARC records)

Poor reputation = inbox → spam folder → blacklist. Services like SendGrid monitor these metrics and provide domain warming schedules for new senders.

Key Takeaway:
Email notifications require specialized delivery services to handle SMTP complexity, bounce management, and sender reputation—deliverability depends on maintaining trust with ISPs, not just technical correctness.