Glossary

What is an SMTP relay?

Short answer

An SMTP relay is a mail server that accepts outgoing email from your application, website or device over SMTP and passes it on to each recipient's mail server. You log in with a username and password, send on port 587 or 465, and the relay handles DNS lookups, retries, signing and bounces. It lets software that only speaks SMTP send reliably without running its own mail server.

Last checked 16 November 2026

An SMTP relay is a mail server that accepts outgoing email from your application, website or device and delivers it to each recipient’s mail server. Your software connects, logs in, and hands over the message using SMTP. The relay does the hard part: finding the recipient’s server through MX records, retrying when it is busy, signing with DKIM and processing bounces.

How an SMTP relay works

  1. Your app opens a TCP connection to the relay on port 587 or 465.
  2. It upgrades to TLS (STARTTLS on 587) or starts encrypted (465).
  3. It authenticates with a username and password.
  4. It sends MAIL FROM, one RCPT TO per recipient, then DATA with the message.
  5. The relay replies 250 to accept it, then queues and delivers the message to each recipient’s server.

Ports are defined by standards: 587 for message submission (RFC 6409) and 465 for submission over implicit TLS (RFC 8314). Port 25 is for relay between mail servers. The SMTP ports guide explains when to use which.

Example settings

Most software asks for the same five values:

Host:     smtp.mailcandor.com
Port:     587 (STARTTLS) or 465 (SSL/TLS)
Username: mailcandor
Password: <your API key>
From:     hello@yourdomain.com

In Nodemailer that is createTransport({ host, port: 465, secure: true, auth: { user, pass } }).

SMTP relay vs SMTP server

People use the terms loosely. Strictly, any program that speaks SMTP is an SMTP server. A relay is one that forwards mail onward to other domains for authenticated users. The mail server at your mailbox provider that receives mail for your domain is not a relay for the public; it only accepts mail addressed to its own users. An “open relay” forwards for anyone and is quickly abused and blocklisted.

Why it matters for app email

Many tools can only send through SMTP: WordPress, Ghost, Jira, printers and scanners, cron jobs and older frameworks. A relay gives them the same authenticated, signed delivery as your main app without code changes. It also stops you running your own mail server, which means no IP reputation to build, no queue to babysit and no blocklists to watch.

Common mistakes

  • Using port 25 from a cloud server. Many hosts block it. Use 587 or 465.
  • Mixing up TLS modes. Port 465 needs implicit TLS (secure: true), port 587 starts plain and upgrades. The wrong combination hangs or fails; see SMTP requires a secure connection.
  • Sending from a domain you have not verified. The relay accepts it, but receivers send it to spam.
  • Opening a new connection per email at high volume. Pool connections or switch to an email API.

How Mailcandor handles it

Mailcandor’s SMTP relay is smtp.mailcandor.com on 465 or 587, username mailcandor, password your API key.

Questions

What is the difference between an SMTP relay and an SMTP server?

Every relay is an SMTP server, but not every SMTP server relays. A relay accepts mail for any recipient from authenticated senders and forwards it on. A receiving server only accepts mail for its own domains.

Which port should I use for an SMTP relay?

Port 587 with STARTTLS or port 465 with implicit TLS. Port 25 is for server-to-server delivery and is often blocked by cloud hosts and ISPs.

What is an open relay?

A server that forwards mail for anyone without authentication. Spammers abuse open relays, so they end up on blocklists. A proper relay always requires a login.

Do I need an SMTP relay if I use an email API?

No. Use the API from your own code, and the relay for tools you cannot change, such as WordPress plugins, printers or a CMS.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.