An SMTP server is a computer running mail software that accepts email using the Simple Mail Transfer Protocol and passes it on towards its destination. An SMTP service is that capability run for you by a provider, so you connect, authenticate and send without operating the server yourself. People search "SMTP servers" and "SMTP services" when they need to send email from an application, a website or a device. This guide explains the difference, what running your own SMTP server involves, what a service gives you, and how to choose.
What is an SMTP server?
SMTP is the protocol that moves email between systems. Your application opens a connection to an SMTP server, identifies itself, states who the message is from and who it is for, and sends the content. The server accepts the message and either delivers it to a local mailbox or relays it to the server of the recipient's domain. RFC 5321 defines the protocol, and our guide to what an SMTP server is goes through the conversation step by step.
In technical terms, the software that does this work is called a mail transfer agent, or MTA. Our article on the mail transfer agent explains how an MTA fits into the wider mail system.
SMTP server vs SMTP service vs SMTP relay
| Term | Meaning | Who runs it |
|---|---|---|
| SMTP server | Any server that speaks SMTP: yours, your host's, or a provider's | Whoever operates it |
| SMTP service | A hosted offering that gives you SMTP access with accounts, authentication, limits, logs and support | A provider |
| SMTP relay | An SMTP server that accepts mail from you and forwards it to the recipients' servers | You or a provider |
In practice, "SMTP service" and "SMTP relay service" mean nearly the same thing. Our guide to SMTP relay explained covers what the relay step does.
Option 1: run your own SMTP server
You can install mail software on a server you control. It gives you full control and, at the lowest level, the lowest direct cost. It also gives you every problem that a provider would otherwise handle.
- IP reputation. New server addresses have no history. Receivers treat unknown senders cautiously, so you must warm up the address. Read IP warm-up.
- Blocked ports. Many hosting and cloud networks block outbound port 25 to stop abuse, which can prevent a server from delivering mail directly.
- DNS requirements. You need correct SPF, DKIM and DMARC records, and reverse DNS that matches your server name. See reverse DNS for email.
- Blocklists. If your address lands on a blocklist, you must find out and request removal. See how to check an email blocklist.
- Queues and retries. You must handle temporary failures, back-off and bounce processing.
- Security and abuse. A compromised server or account can send spam in minutes and wreck your reputation.
- Monitoring. Someone must watch queues, logs, complaints and reputation continuously.
Running your own server makes sense for teams with real mail expertise, special requirements, or a business built around mail infrastructure. For most applications it is more work than value.
Option 2: use an SMTP service
A service gives you a host name, a port, a user name and a password or key. You set them in your application and keep sending as you do today. The provider carries the infrastructure. What you should expect:
- Authenticated, encrypted connections. See email SSL and TLS.
- Domain authentication support, so mail is signed as your brand.
- Queueing, retries and pacing towards each mailbox provider.
- Bounce and complaint handling, with suppression of bad addresses.
- Logs and events so you can trace each message. See tracing messages.
- Support when something goes wrong.
Our SMTP relay works this way: you create scoped credentials in the dashboard, connect to smtp.migosmtp.com on port 587 with STARTTLS, and send. For the settings, read SMTP settings, ports and authentication.
Free SMTP servers: what they are and where they stop
Free options include the SMTP servers of personal mailboxes, the free tiers of sending services, and hosting accounts that include mail. They are fine for testing and very small volumes. They usually come with low daily limits, restrictions on automated or bulk sending, limited logs and little support, and some can suspend an account that sends outside the expected pattern. Read our free SMTP server guide for what to expect, and use a proper service when the email matters to your business.
How to choose an SMTP service
- Estimate your volume. Daily and peak, and how fast it grows.
- Check authentication. You need SPF, DKIM and DMARC support for your own domain.
- Check the connection options. Standard ports, TLS, and credentials that can be limited and revoked.
- Look at reputation handling. Shared and dedicated IP options. See dedicated vs shared IP.
- Read the logs. Can you see what happened to each message?
- Check for an API as well. You may want one later. See SMTP or API.
- Compare cost at your volume, including add-ons.
- Test support with a real question during the trial.
Connecting an application to an SMTP service
# typical framework settings (values are placeholders)
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=your-username
MAIL_PASSWORD=your-key # keep in an environment variable or secret store
MAIL_ENCRYPTION=tls # STARTTLS on 587; use SSL on 465
Test the connection first, as shown in our guide on SMTP connection and TLS troubleshooting, then send a real message and read the delivery log.
Use a subdomain and authentication from the start. Sending application mail from a subdomain, with SPF, DKIM and DMARC set up, protects the reputation of your main domain. See sending subdomain strategy.
A worked example: moving from your own server to a service
Consider a small software company that sends account emails from a mail server on its own virtual machine. It works for a year, then a provider change moves the server to a new address. Messages from the new address start to land in spam, because the address has no history and the reverse DNS entry was not updated. The team spends days on reputation instead of on its product.
With a hosted service, the same team changes three settings in the application: the host, the port and the credentials. It publishes the provider's authentication records in DNS, sends a test message and reads the delivery log. The provider handles the sending addresses, warm-up guidance, queues and bounce processing. If something goes wrong, the logs show which mailbox provider deferred the message and why. Our article on migrating to a new provider without losing deliverability lists the steps.
Which option suits which team?
| Situation | Likely choice |
|---|---|
| Testing or a hobby project with a few messages a day | A free tier or a personal mailbox, with limits in mind |
| A website or app that sends receipts, resets and notices | A hosted SMTP service with authentication and logs |
| A product that sends at high volume or to many customers | A hosted service with dedicated IP options and event webhooks |
| A company whose business is mail infrastructure | Its own servers, with a dedicated team to run them |
Need an SMTP service for your application? Tell us what you send and how much, and we will help you set up credentials, authentication and monitoring so your first message lands properly.
References and further reading
Frequently asked questions
What is an SMTP server?
An SMTP server is a computer running mail software that accepts email using the Simple Mail Transfer Protocol and delivers it locally or passes it on to the recipient's mail server.
What is the difference between an SMTP server and an SMTP service?
An SMTP server is any server that speaks SMTP, run by anyone. An SMTP service is a hosted offering from a provider that gives you SMTP access with accounts, authentication, limits, logs and support, so you do not run the infrastructure yourself.
Should I run my own SMTP server?
Only if you have real mail expertise or special requirements. You take on IP reputation, blocked ports, DNS records, blocklists, queues, security and monitoring. Most applications are better served by a hosted service.
Are free SMTP servers good enough?
They are fine for testing and very small volumes, but they usually have low daily limits, restrictions on bulk or automated sending, limited logs and little support.
What settings do I need to connect to an SMTP service?
A host name, a port, an encryption mode, and a user name with a password or key. Port 587 with STARTTLS is the usual choice, and port 465 with SSL/TLS is an alternative. Copy the exact values from your provider dashboard.