Skip to main content
ScrubiMail

SMTP relay

Point any app, plugin or mail library at smtp.scrubimail.com on port 587. It uses the same domains, suppression list and credits as the HTTP API, so you can switch between the two freely.

Related:SMTP relayTransactional email

Checked against the API source on

Connection settings

SMTP settings
SettingValue
Hostsmtp.scrubimail.com
Port587
EncryptionSTARTTLS. Connect in plain text, then upgrade with STARTTLS. Do not use SSL/TLS on port 465.
AuthenticationRequired (AUTH PLAIN).
UsernameYour ScrubiMail account email address.
PasswordAn active API key with the send scope, or a key with no scopes. Not your login password.
From addressAny address on a domain you have verified. See Sending setup.

The username must be the email address of the account that owns the key. A key that belongs to a different account is refused. If the key has an IP allow-list, the address your SMTP client connects from must be on it.

GET /send/smtp/config/ returns these settings for your account as JSON, if you want to show them in your own product.

What is checked on every message

Logging in only identifies your account. Each message is then checked before the mail server accepts it, with the same rules as the HTTP API:

  1. The From domain must be a verified sending domain on your account.
  2. If your app sets an envelope sender (MAIL FROM), its domain must be one of your verified domains too. An empty sender is allowed.
  3. The recipient must not be on your suppression list.
  4. You must have a sending credit. One credit is charged for each recipient address of each message.

A message that passes is recorded, so it appears in GET /send/history/ and your analytics with metadata.source set to smtp, and its status updates to delivered or bounced like any other. Delivery results come back the same way as for API sends.

Examples

Keep the key in an environment variable. In every example, replace [email protected] with your account email and use a From address on a verified domain.

import nodemailer from "nodemailer";

const transporter = nodemailer.createTransport({
  host: "smtp.scrubimail.com",
  port: 587,
  secure: false, // STARTTLS is negotiated after connecting
  requireTLS: true,
  auth: {
    user: "[email protected]",
    pass: process.env.SCRUBIMAIL_API_KEY,
  },
});

await transporter.sendMail({
  from: '"Your Company" <[email protected]>',
  to: "[email protected]",
  subject: "Welcome aboard",
  text: "Thanks for signing up!",
  html: "<p>Thanks for signing up!</p>",
});

WordPress and other plugin-based apps: install an SMTP plugin, choose a custom or "other" SMTP provider, and enter the settings from the table above with STARTTLS on port 587.

Error codes

SMTP errors arrive during the conversation, so your app sees them immediately. The text after the code says why.

SMTP response codes
CodeMeaningWhat to do
535Login failed. The username is not the account email, the key is wrong, deactivated or expired, the key lacks the send scope, or the connecting IP is not on the key's allow-list.Use the account email as the username and an active key with send as the password.
550 5.7.1The per-message check refused the message. The reason follows the code, for example From domain example.org is not a verified sending domain on this account.Fix the cause below and send again. Retrying unchanged will fail the same way.
451 4.3.0A temporary failure: our side could not run the check right now.Retry later. Mail libraries and queues retry on a 4xx automatically.
550 5.7.1 reasons
Reason textCause and fix
Message has no valid From address.The From header is missing or has no domain. Set one.
From domain <domain> is not a verified sending domain on this account.The domain is not verified on your account, or it is a subdomain you did not add. Add and verify it.
Envelope sender domain <domain> is not a verified sending domain on this account.Your app sets a MAIL FROM or Return-Path on another domain. Use a verified domain, or let your library use the From address.
Recipient is on the suppression list.That address bounced, unsubscribed or was added by you. Remove it from the list only if you are sure it is good.
Insufficient credits. Please purchase more credits.Your sending balance is 0. Top up in the app.

Connection problems

  • Timeout or connection refused. Your host or network blocks outbound port 587. Many cloud providers block port 25 but allow 587; if yours blocks both, send with the HTTP API instead.
  • Certificate error. The server presents a certificate for smtp.scrubimail.com. Make sure your client connects to that exact host name and not to an IP address.
  • Status stays `sending`. The message was accepted and is being delivered. Delivery results arrive within about a minute; check GET /send/status/{message_id}/ or history.
  • Mail lands in spam. Check the message source for spf=pass, dkim=pass and dmarc=pass. If one fails, review the records in Sending setup.

Something missing or wrong? Email [email protected].