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
- Your app opens a TCP connection to the relay on port 587 or 465.
- It upgrades to TLS (STARTTLS on 587) or starts encrypted (465).
- It authenticates with a username and password.
- It sends
MAIL FROM, oneRCPT TOper recipient, thenDATAwith the message. - The relay replies
250to 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.