SMTP relay for the apps you already run.
Point any app that sends transactional email over SMTP at snd.email and log in with an API key. Its messages get the same logs, limits and webhooks as the REST API.
Connection settings
| Server | smtp.snd.email |
|---|---|
| Ports | 587 or 2525 with STARTTLS, 465 with TLS. Port 25 is not offered. |
| Username | Any value, for example snd |
| Password | An API key with the emails:send scope |
| Login | PLAIN or LOGIN, only over TLS |
| Turning it on | SMTP is off until an Owner turns it on: in the dashboard, open SMTP and press Activate. |
Works with your stack
Any SMTP client works. This is Nodemailer; the SMTP guide also shows Python's smtplib, PHPMailer and Postfix.
import nodemailer from 'nodemailer';
const transporter = nodemailer.createTransport({
host: 'smtp.snd.email',
port: 587,
secure: false,
requireTLS: true,
auth: { user: 'snd', pass: process.env.SND_API_KEY },
});
const info = await transporter.sendMail({
from: 'Acme <hello@acme.example>',
to: 'you@acme.example',
subject: 'Welcome',
text: 'Thanks for signing up.',
html: '<p>Thanks for signing up.</p>',
headers: { 'X-SND-Tag': 'welcome', 'X-SND-Metadata-user_id': '1042' },
});
console.log(info.response);Same logs and webhooks as the API
A message sent over SMTP is the same as one sent with POST /v1/emails: the same domains, keys, suppression list, sending limits, tracking, webhooks and Activity Logs. The reply to every accepted message carries the id of its request, which the API looks up.
Streams, tags and metadata
X-SND-Stream: broadcastsends on the domain's Broadcast stream.X-SND-Tag: welcomeadds a tag, at most 5.X-SND-Metadata-user_id: 1042adds a metadata key, at most 10.
These headers are removed before the message is sent; any other header that starts with X-SND- is refused.
What the relay refuses
- S/MIME and PGP mail, signed or encrypted.
- SMTPUTF8: addresses with characters outside ASCII. A name or a subject in any language is fine when your client encodes it, as clients do.
- Login without TLS, and the CRAM-MD5 login method.
- Port
25. - Attachments of blocked types, such as programs, Office files with macros and archives other than ZIP (the full list).
Limits
- A message is at most 10,000,000 bytes as your client sends it, headers and attachments included.
- At most 50 recipients per message,
To,CcandBcctogether. - The same sending limits as the API; over a limit, your client keeps the message and tries again later.
Every reply code and what to do about it: Sending over SMTP.