SMTP relay
Point any app at smtp.scrubimail.com
Use ScrubiMail from WordPress, Django, Laravel, Nodemailer or any tool that speaks SMTP. Log in with your account email and an API key; every message is checked before it is accepted.
The Free plan includes 200 sending credits a month. Signing up does not ask for a card.
- Host
- smtp.scrubimail.com
- Port
- 587
- Encryption
- STARTTLS
- Username
- your account email
- Password
- an API key with the send scope
- From address
- any address on a verified domain
- From address is on a verified domain
- Recipient is not on your suppression list
- You have a sending credit
Why use the relay
Change four settings and keep your code
The relay is the same sending service as the API, reached over the protocol your app already speaks.
STARTTLS on 587
The connection is upgraded to TLS before you authenticate. Use STARTTLS, not SSL on 465.
smtp.scrubimail.com:587
API key as the password
Log in with your account email and an API key. Limit the key to the send scope so it can do nothing else.
scope: send
Checked per message
The From domain must be verified, the recipient must not be suppressed and you must have credits. Failures are refused with a reason.
550 5.7.1 <reason>
Same account, credits and history
SMTP and API sends draw on one sending balance and appear in the same send history.
1 credit per message
Attachments up to 20 MB
Attach files in your mail library as usual. A message may be up to 20 MB in total.
Works with any SMTP client
Frameworks, CMS plugins, CRMs and scripts: anything with an SMTP server setting can send through the relay.
How it works
Set up in four steps
- 01
Verify your domain
Add the domain you send from and publish its SPF and DKIM records. Mail from an unverified domain is refused.
- 02
Create an API key
In the dashboard, create a key with the send scope. Copy it when it is shown; it appears in full only once and cannot be viewed again.
- 03
Enter the settings
Host smtp.scrubimail.com, port 587, STARTTLS, your account email as the username and the key as the password.
- 04
Send a test message
Send from an address on your verified domain and check the result in your send history.
Setup snippets
Copy the settings for your stack
Replace the username with your ScrubiMail account email and keep the API key in an environment variable or a secrets store.
- Host smtp.scrubimail.com, port 587, STARTTLS.
- Username: your account email. Password: an API key with the send scope.
- From address: any address on a verified domain.
- In WordPress, choose TLS, not SSL, for the encryption.
const nodemailer = require("nodemailer");
const transporter = nodemailer.createTransport({
host: "smtp.scrubimail.com",
port: 587,
secure: false, // STARTTLS is negotiated after connecting
requireTLS: true,
auth: {
user: "[email protected]", // your ScrubiMail account email
pass: process.env.SCRUBIMAIL_API_KEY, // an API key with the send scope
},
});
await transporter.sendMail({
from: '"Your App" <[email protected]>', // an address on a verified domain
to: "[email protected]",
subject: "Welcome aboard",
html: "<p>Thanks for signing up!</p>",
});# settings.py
import os
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = "smtp.scrubimail.com"
EMAIL_PORT = 587
EMAIL_USE_TLS = True # STARTTLS
EMAIL_HOST_USER = "[email protected]" # your ScrubiMail account email
EMAIL_HOST_PASSWORD = os.environ["SCRUBIMAIL_API_KEY"] # key with the send scope
DEFAULT_FROM_EMAIL = "Your App <[email protected]>"# .env
MAIL_MAILER=smtp
MAIL_HOST=smtp.scrubimail.com
MAIL_PORT=587
MAIL_ENCRYPTION=tls
[email protected]
MAIL_PASSWORD=your_scrubimail_api_key
[email protected]
MAIL_FROM_NAME="Your App"# WP Mail SMTP plugin: Settings > Mailer > "Other SMTP"
From Email: [email protected] (an address on a verified domain)
From Name: Your Company
Mailer: Other SMTP
SMTP Host: smtp.scrubimail.com
Encryption: TLS (STARTTLS on port 587; do not choose SSL)
SMTP Port: 587
Authentication: On
SMTP Username: [email protected] (your ScrubiMail account email)
SMTP Password: your_scrubimail_api_key (an API key with the send scope)import os
import smtplib
from email.message import EmailMessage
msg = EmailMessage()
msg["From"] = "Your App <[email protected]>"
msg["To"] = "[email protected]"
msg["Subject"] = "Welcome aboard"
msg.set_content("Thanks for signing up!")
with smtplib.SMTP("smtp.scrubimail.com", 587) as s:
s.starttls()
s.login("[email protected]", os.environ["SCRUBIMAIL_API_KEY"])
s.send_message(msg)When something fails
Replies your app will see
Failures happen during the SMTP conversation, so your app or mail library reports them immediately.
| Reply | What it means | What to do |
|---|---|---|
535 | The login was wrong: the username is not your account email, or the key is revoked or lacks the send scope. | Use your account email as the username and an active API key with the send scope as the password. |
550 5.7.1 | The message failed a check: the From domain is not verified, the recipient is suppressed, or you have no credits. | Send from a verified domain, remove the address from suppression if it is right, or add credits. The reason follows the code. |
451 4.3.0 | A temporary problem on our side. | Your mail library retries automatically. No action needed. |
Connection times out | Your host blocks outbound port 587. | Allow outbound 587, or use the HTTP API instead. |
SMTP or API
Use the one your app already speaks
They share the same domains, suppression list, credits and history. Choose by what your software supports.
SMTP relay
- For apps, plugins and frameworks that only offer an SMTP setting.
- Messages are sent as written, so fill in personal values in your own app.
- Up to 20 MB per message.
- Needs outbound port 587.
HTTP API
- For code you control, over plain HTTPS.
- Templates, personalisation tags, bulk sends and campaigns.
- A message_id for every send and a status endpoint to poll.
- Up to 10 attachments, 10 MB in total.
Use cases
Where the relay fits
WordPress sites
Replace the default PHP mailer with an SMTP plugin so site and form emails are sent from your verified domain and recorded in your send history.
Framework mailers
Django, Laravel, Rails and Nodemailer take an SMTP host, port and credentials, and nothing else changes in your code.
CRMs and plugins
Any tool with an outgoing mail server setting can send through ScrubiMail from your verified domain.
Scripts and cron jobs
Alerts and reports from servers can use the same relay with a key limited to the send scope.
Pricing
Pay for the email you send
One sending credit per message, the same as the HTTP API.
- Free plan
- 200 emails
- included every month. Signing up does not ask for a card.
- Monthly plans from
- $9 a month
- Starter includes 20,000 sending credits a month.
- Pay as you go
- from $0.0006 per email
- $1.50 buys the first 1,000 credits; the rate drops as you buy more.
FAQ
Frequently asked questions
Settings, limits and error codes.
Which port and encryption should I use?
Use smtp.scrubimail.com on port 587 with STARTTLS. The relay does not use SSL/TLS on port 465, so pick "TLS" or "STARTTLS" in your app, not "SSL".
What are the username and password?
The username is your ScrubiMail account email. The password is an API key with the send scope, not your login password. Create keys in the dashboard under API Keys; a key is shown in full only once, so copy it then.
What does the relay check?
Every message is checked when it is submitted: the From address, and the envelope sender if your app sets one, must be on a domain you have verified, the recipient must not be on your suppression list, and you need a sending credit. A message that fails a check is refused during the SMTP conversation with a 550 5.7.1 reply and a reason, so your app sees the error straight away.
How much does an SMTP message cost?
One sending credit per message, the same as the HTTP API, drawn from the same sending balance. Accepted messages are recorded in your send history.
Do personalisation tags work over SMTP?
No. Messages sent over SMTP are delivered as written, so fill in names and other values in your own app before sending. Tags such as {{first_name|there}}, templates and campaigns are part of the HTTP API.
How large can a message be?
Up to 20 MB per message over SMTP, attachments included. Attach files with your mail library as you normally would.
My host blocks outbound connections on 587.
Some hosts do. Ask your provider to allow outbound port 587, or send with the HTTP API, which needs only HTTPS.
Connect your app in minutes
Create an account, verify a domain and enter four settings.