SMTP guide

What an SMTP server and an SMTP relay are, and when to use an external one

How an email travels from your application to the recipient's inbox, what each server does and why a website's or a SaaS product's email usually goes out through an external relay.

SMTP server and SMTP relay

SMTP (Simple Mail Transfer Protocol, RFC 5321) is the protocol email is sent with. An SMTP server is the software that receives messages over SMTP and hands them to the next server, or to the mailbox if it's the final destination.

An SMTP relay is an SMTP server that accepts your messages and takes care of delivering them to each recipient's server. An SMTP relay service is a provider that plays that role for your application: you connect with a username and password, and it handles delivery, retries and bounces.

Short answer

An SMTP relay is the server that receives your application's email and delivers it to the recipients' servers. Using an external one, with your domain authenticated (SPF and DKIM), is the norm when your host's email lands in spam, when you need to know what happens to every send or when you send from several sites or applications.

Journey

How an email travels to the inbox

  1. 1Your application or plugin connects to the sending server on port 587 or 465, authenticates and hands over the message.
  2. 2The sending server checks who is sending and from which domain, signs the message with DKIM and queues it.
  3. 3It looks up the mail servers (MX records) of the recipient's domain in DNS.
  4. 4It connects to the recipient's server, usually on port 25 and with STARTTLS when available, and delivers the message.
  5. 5The recipient's server checks SPF, DKIM and DMARC, plus the sender's reputation, and decides whether to put it in the inbox, send it to spam or reject it.
  6. 6If it can't be delivered, the sending server receives a bounce and logs it.
Options

External relay, your host's SMTP or a personal mailbox

OptionDesigned forWhat you should know
Your host's SMTP or mail()Basic website email, with no extra setupIt usually shares a server and reputation with other sites, may have limits and port blocks, and gives no delivery log.
Personal mailbox (Gmail, Outlook…)Email written and sent by peopleIt has usage limits, usually requires an app password or OAuth, and the sender is tied to that account.
Transactional SMTP relayAutomated email from websites, stores and applicationsIt sends with your authenticated domain, logs the status of every email and handles bounces and limits. You need to verify the domain in DNS.
When

When an external SMTP relay makes sense

  • Your site's or store's email lands in spam or doesn't arrive.
  • Your host limits sending or blocks SMTP ports.
  • You need to know whether each email was delivered, bounced or rejected, and why.
  • You manage several sites or clients and want the same setup for all of them.
  • You send from an application or a SaaS product: sign-ups, passwords, invoices, notifications.
  • You want to keep transactional email apart from your team's email, so a problem in one doesn't affect the other.
Choosing

What to look for in an SMTP relay

  • Domain authentication: SPF and DKIM with your domain, and DMARC compatibility.
  • Ports 587 and 465 with TLS, plus an HTTPS API in case the ports are blocked.
  • A log of every send with its status and the destination server's reply.
  • Bounce and complaint handling, so you stop sending to addresses that fail.
  • Clear limits and how they grow with your volume.
  • Price and terms: a free plan to try it, no lock-in and support that answers.
SMTP or API

SMTP relay or sending API

Many services offer both. SMTP works with any plugin, framework or program without writing code: you only change the server, the port and the credentials.

An API sends over HTTPS (port 443), so SMTP port blocks don't affect it, and it returns structured replies your application can act on. In exchange, it has to be integrated in your code.

At Mailiqo you can use both at once: they share domains, limits and the sending log.

With Mailiqo

Mailiqo as an SMTP relay

Mailiqo is a transactional sending service with SMTP and an API. To use it as a relay:

SettingValue
Serversmtpmq.mailiqo.com
Port and encryption587 with STARTTLS (recommended) or 465 with SSL/TLS
AuthenticationRequired, with each domain's SMTP username and password
SenderAn address on a verified domain, with an exact match
RecipientsUp to 50 per message
SizeUp to 50 MiB per message

New accounts start with lower hourly and daily limits, which rise automatically as they send without problems. If you need volume from day one, contact support.

FAQ

Frequently asked questions

Is an SMTP relay the same as an SMTP server?

A relay is an SMTP server with a specific role: it accepts messages from others (your application) and passes them on to their destination. Every relay is an SMTP server, but not every SMTP server relays for you.

What is an open relay?

A server that relays email from anyone without asking for authentication. They were used to send spam and today they quickly end up on blocklists. A legitimate relay always requires a username and password, or restricts who can use it.

Do I need to run my own SMTP server?

To send a website's or an application's email, usually not. Running your own server means managing IP reputation, blocklists, bounces and security. A relay service gives you all of that ready-made.

Does an SMTP relay guarantee my emails won't go to spam?

Nothing can guarantee that. A good relay lays the groundwork (authenticated domain, solid infrastructure and bounce control), but your content, the quality of your lists and whether recipients expect your emails also count.

What happens if the relay rejects an email?

Your application gets an SMTP reply with a code and a reason. If it's temporary (4xx) you can retry later; if it's permanent (5xx) you need to fix the cause. Our SMTP errors guide explains how.

Mailiqo

An SMTP relay for your site or application

Mailiqo sends your email with your authenticated domain, over SMTP or the API, with the status of every send in the dashboard. Start free, no card required.

Create a free account
Mailiqo Labs

Put the guide into practice

The tools let you check SPF, DMARC, headers, bounces and HTML with your own data, without registering.