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.

Ask an AI · tailored to your setup

Get help choosing the right port for your setup

I read this on the Email Almanac about email ports (25, 465, 587, 993, 995): "Port 587 is the modern standard for authenticated sending. Port 25 is for server-to-server relay. Ports 993 and 995 are for retrieving email with IMAP or POP3." Help me figure out which port I should be using for my setup. I need: 1. Sending vs retrieving: Am I configuring an app to send email, or setting up my phone to retrieve email? 2. ESP requirements: If I'm sending, what does my ESP's documentation say (check for SMTP settings or API docs)? 3. Common errors: If port 587 isn't working, should I try 465? Is port 25 even an option? 4. TLS/SSL settings: Does my port require STARTTLS or implicit SSL? --- My details (fill in what applies): - What I'm doing: [sending transactional email / setting up email client / configuring marketing ESP / debugging connection] - Platform/ESP: [e.g. SendGrid, Postmark, Gmail SMTP, Mailchimp, custom server] - Error message (if any): copy/paste the exact error - Current port setting: what port are you trying right now? - Experience level: beginner / intermediate / advanced

Edit the yellow boxes, then send to the AI of your choice.