New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
BasicsUpdated 15 Oct 2026

What is an SMTP server, and which one should you use?

SMTP is how email leaves your application and travels to the recipient's mailbox. Here is what an SMTP server does, which ports and settings matter, and when your own mailbox provider is not enough.

MO
Written by Mateus Oliveira
Senior SMTP and MTA Engineer
Reviewed by Karan Malhotra
  • Published2 Sep 2026
  • Read time6 min
  • Length1,261 words
Share this guide

At a glance. Standard ports: 587 (STARTTLS), 465 (implicit TLS) · Port 25: Server to server, often blocked · MigoSMTP relay: smtp.migosmtp.com:587 · Note: Check provider limits before use

The short version

  1. What an SMTP server does. SMTP stands for Simple Mail Transfer Protocol.
  2. The settings you will be asked for. Almost every application that sends mail asks for the same five things: a host name, a port, a security mode, a username and a password.
  3. Ports: 587, 465, 25 and 2525. Port 587 is the standard submission port.
  4. Testing a connection from the command line. Before you blame the application, check that the server is reachable and speaks TLS.
  5. Using your mailbox provider as an SMTP server. Gmail and Microsoft 365 both let you send through their SMTP servers, and for a handful of messages from a personal tool that is fine.
  6. When you need a sending service. A sending service, also called an SMTP relay or a transactional email provider, gives your application an SMTP endpoint and an API, and runs the infrastructure that makes delivery reliable: reputation management, feedback loops, bounce handling, suppression lists and logs.

What an SMTP server does

SMTP stands for Simple Mail Transfer Protocol. An SMTP server accepts a message from a sender, works out where the recipient's mail is hosted by looking up the MX record for their domain, and hands the message over to that destination. When you press send in an email app, or when a web application sends a password reset, an SMTP server is doing the work.

There are two jobs that people often mix up. Sending mail is done over SMTP. Reading mail, in an app or webmail, uses other protocols such as IMAP. When a settings screen asks for an "outgoing server", it wants the SMTP server.

The settings you will be asked for

Almost every application that sends mail asks for the same five things: a host name, a port, a security mode, a username and a password. The host name belongs to your provider. The username and password are credentials created for your account, and for a sending service they are usually separate from your login to the dashboard.

Keep credentials out of your source code. Put them in environment variables or a secrets manager, and create one set per application so you can revoke a single one without breaking everything else.

Ports: 587, 465, 25 and 2525

Port 587 is the standard submission port. The connection starts in plain text and upgrades to an encrypted one with STARTTLS. Port 465 starts encrypted from the first byte, which is called implicit TLS, and it is widely supported again. Port 25 is for server-to-server delivery and is commonly blocked by cloud hosts and home connections to limit spam. Port 2525 is not an official standard, but some providers offer it as an alternative when 587 is blocked.

If a connection times out, the usual cause is a firewall or a hosting provider that blocks the port, not a wrong password. Test from the same machine that will send, not from your laptop.

Testing a connection from the command line

Before you blame the application, check that the server is reachable and speaks TLS. This command connects to a submission port and prints the certificate and the server's greeting. Replace the host with your provider's.

openssl s_client -starttls smtp -connect smtp.example.com:587

A successful result shows a certificate chain and a line beginning with 220. If you see a timeout, the port is blocked. If you see a certificate error, check the host name you typed.

Using your mailbox provider as an SMTP server

Gmail and Microsoft 365 both let you send through their SMTP servers, and for a handful of messages from a personal tool that is fine. They are built for people, not for applications. Google documents daily sending limits for personal and Workspace accounts, and Microsoft applies its own limits and has been phasing out basic username and password sign-in for SMTP. Check each provider's current documentation before you rely on either.

The larger problem is what you lose. A mailbox provider gives you little delivery reporting, no per-message logs you can search, and no way to separate marketing from transactional mail. If a message does not arrive, you have no trail to follow.

When you need a sending service

A sending service, also called an SMTP relay or a transactional email provider, gives your application an SMTP endpoint and an API, and runs the infrastructure that makes delivery reliable: reputation management, feedback loops, bounce handling, suppression lists and logs. You pay for volume and features instead of running servers.

Choose one when email matters to your business, for example passcodes, receipts and order updates, or when you send more than a few hundred messages a day. The next section lists what to compare.

What to compare before you choose

Look at how the price scales with your real monthly volume, not the headline plan. Check which ports are supported, whether you get an API as well as SMTP, how long logs are kept, whether you can use a dedicated IP, and how support works when something goes wrong at an awkward hour.

If you invoice in rupees, ask whether the provider bills in INR and issues GST invoices. For senders in the UK and EU, ask about data processing terms. Our own plans, ports and billing are on the pricing page, and our guide for Indian senders covers the practical side.

Common SMTP errors and what they mean

SMTP replies are three-digit codes. Codes starting with 2 mean success, 4 means a temporary problem and the sender should retry, and 5 means a permanent failure. A 535 reply means authentication failed, so check the username and password, and whether the account needs an app-specific password. A 550 reply usually means the recipient's server rejected the message or the address does not exist.

A 421 or 450 reply means the receiving server asked you to try later, often because of rate limiting. A timeout points to a blocked port. A TLS handshake error often means the wrong security mode for the port, for example STARTTLS on 465. Our free bounce code lookup explains the longer enhanced codes that follow.

Security basics

Always use an encrypted connection. Never send credentials over a plain connection on any port. Use a unique credential for each application, store it as a secret, and rotate it if a developer leaves or a server is retired.

Restrict who can use your account where you can, for example by limiting API key permissions. Watch your sending logs for volume you did not expect, which is often the first sign of a leaked credential.

Whichever server you use, authenticate your domain

An SMTP server can deliver your message, but mailbox providers decide whether to trust it. Publish SPF and DKIM for your domain and add a DMARC record, so Gmail, Outlook and Yahoo can see that the mail really comes from you. Without them, even a good provider's mail can land in spam or be rejected.

Our setup guide walks through each record, and the free checker tells you what is missing on your domain right now.

Further reading and sources

Ready to try it? Start on the free plan and send your first message in minutes.

Start free

Frequently asked questions

What is an SMTP server?

An SMTP server is a program that accepts email from a sender and passes it on toward the recipient using the Simple Mail Transfer Protocol. Your mail client or application hands the message to it, and it delivers the message to the recipient's mail server.

Which SMTP port should I use?

For sending from an application or mail client, use port 587 with STARTTLS or port 465 with implicit TLS. Port 25 is for server-to-server delivery and is often blocked on consumer and cloud networks.

Do I need my own SMTP server?

Not usually. Running one means managing IP reputation, authentication, queues and abuse handling. Most teams send through a provider's SMTP relay instead and keep their own server out of the delivery path.

Is an SMTP server the same as a mail server?

Not exactly. SMTP handles sending and relaying. A full mail server usually also stores mailboxes and lets users read mail, which is done with other protocols such as IMAP.

Topics#smtp#smtp server#email ports#smtp settings
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Start free Talk to sales