Skip to content

Documentation

SMTP.

For apps that cannot call an API: WordPress, Laravel, Rails, Django, Supabase Auth, and anything with an SMTP settings screen.

Settings

SettingValue
Hostsmtp.mailtruss.com
Port587 with STARTTLS (recommended), or 465 with TLS
Usernamemailtruss (any value works; the key identifies you)
PasswordA Mailtruss API key. A sending-only key is enough.
EncryptionRequired. Sign-in is refused on an unencrypted connection.

Mail sent over SMTP is an API send: the same domain checks, quota, suppressions, test addresses, delivery trace, webhooks and logs. It appears under Emails like any other message.

.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtruss.com(highlighted line)
MAIL_PORT=587
MAIL_USERNAME=mailtruss
MAIL_PASSWORD=ms_live_... # a Mailtruss API key(highlighted line)
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello@yourdomain.com

How SMTP mail is handled

  • The From address must be on a domain you have verified, as with the API. Sending to the test addresses works before any domain is verified.
  • Recipients come from the SMTP envelope. Addresses you send to that are not in the To or Cc headers are delivered as Bcc and stay hidden.
  • Up to 50 recipients and 18 MB per message, attachments included.
  • If your app retries a message it already sent (same Message-ID), it is not sent twice.
  • Tag messages with a header: X-Mailtruss-Tags: category=billing, plan=pro. Threading headers (In-Reply-To, References) and List-Unsubscribe are passed through.
Try it with swaks
swaks --server smtp.mailtruss.com:587 --tls \
--auth-user mailtruss --auth-password "$MAILTRUSS_API_KEY" \
--from hello@yourdomain.com --to delivered@mailtruss.test

Errors

ReplyMeaningWhat your app should do
535The API key is wrong or revoked.Fix the password.
550Refused for good: unverified domain, suppressed recipient, invalid message.Do not retry; the reply says why.
552Too large, or the monthly limit is reached.Upgrade, or wait for the next month.
451 / 452Temporary: rate limit, daily limit, or a brief problem on our side.Retry later (mail servers do this automatically).

Last updated

Something wrong or unclear on this page?

Report an issue