Documentation
SMTP.
For apps that cannot call an API: WordPress, Laravel, Rails, Django, Supabase Auth, and anything with an SMTP settings screen.
Settings
| Setting | Value |
|---|---|
| Host | smtp.mailtruss.com |
| Port | 587 with STARTTLS (recommended), or 465 with TLS |
| Username | mailtruss (any value works; the key identifies you) |
| Password | A Mailtruss API key. A sending-only key is enough. |
| Encryption | Required. 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
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) andList-Unsubscribeare passed through.
Errors
| Reply | Meaning | What your app should do |
|---|---|---|
535 | The API key is wrong or revoked. | Fix the password. |
550 | Refused for good: unverified domain, suppressed recipient, invalid message. | Do not retry; the reply says why. |
552 | Too large, or the monthly limit is reached. | Upgrade, or wait for the next month. |
451 / 452 | Temporary: rate limit, daily limit, or a brief problem on our side. | Retry later (mail servers do this automatically). |