What are common email ports (25, 465, 587, 993, 995)?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
Email ports are like numbered doors on a mail server. Each port handles a specific job (sending, receiving, or retrieving email), and using the wrong one is like knocking on the wrong door. Nobody answers.
Port 25 (SMTP) is the original email highway. Mail servers use it to talk to each other. When SendGrid sends an email to Gmail, they're using port 25. You won't use this port directly unless you're running your own mail server. Most ISPs block outbound port 25 anyway (spam prevention).
Port 587 (SMTP Submission) is what you use to send email through an ESP or mail server. This is the modern standard for authenticated sending. When you configure Mailchimp or Postmark in your app, you're almost always using port 587. It requires a username and password, which is why it's safer than port 25.
Port 465 (SMTPS) is the older secure SMTP port. It wraps the entire connection in SSL/TLS from the start. Some ESPs still support it (like Gmail SMTP), but port 587 with STARTTLS is now preferred. If 587 doesn't work, try 465.
Port 993 (IMAPS) is for retrieving email with IMAP over SSL. If you're setting up Apple Mail or Fastmail on your phone, you're probably using port 993 to pull messages from the server. IMAP keeps messages on the server (so you can access them from multiple devices).
Port 995 (POP3S) is for retrieving email with POP3 over SSL. POP3 downloads messages and usually deletes them from the server. It's older and less flexible than IMAP, but some people still use it.
So, quick rule: Sending email? Port 587. Retrieving email on your phone? Port 993. If you're building an app that sends transactional email, your ESP's docs will tell you which port to use (it's almost always 587).
Stuck on SMTP configuration? Our SOS hotline is free, and we can walk you through it.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.