Integrations
SMTP relay (coming soon)
The SMTP relay is coming soon. Until it opens, send with the API, an SDK or the WordPress plugin.
Coming soon. The SMTP relay isn't open yet, so there is no server you can connect to today. Until it opens, send with the API, an SDK or the WordPress plugin. This page describes how the relay will work.
The Ternwire SMTP relay will accept mail from any SMTP client and turn each message into the same request as POST /v1/emails. Sending domains, limits, billing, delivery states, and webhooks will work exactly as they do over HTTP. You will sign in with an API key with sending access as the password. It suits an application or framework that already speaks SMTP when switching to the API is not practical. The server name and settings will appear here when it opens.
How a message is translated
- The sender is the first
Fromheader address, or the envelope sender when the header is missing. It must belong to a verified sending domain. - Recipients come from the SMTP envelope (
RCPT TO). An address listed inToorCckeeps that role, and every other envelope recipient is sent as Bcc. A header address that is not in the envelope is not sent. - Display names are dropped. The first
Reply-Toaddress, customX-headers, andList-Unsubscribewith one-clickList-Unsubscribe-Postare kept. - Attachments are uploaded and checked before the relay replies, so a 250 reply means every attachment is clean. Inline images are sent as regular attachments.
- Your
Message-ID,In-Reply-To, andReferencesheaders are not preserved. Ternwire assigns its own message ID.
Replies and retries
| Reply | Meaning |
|---|---|
250 Queued as msg_... | The message was accepted. Track it with that ID. |
| 451, 452 | Temporary, such as rate limiting or an attachment check that has not finished. Retry later. SMTP clients and mail servers do this automatically. |
| 535 | The password is not a valid API key with sending access. |
| 550 | A recipient is suppressed. |
| 552 | The message, its body, or an attachment is too large. |
| 554 | Permanent, such as a rejected attachment or a request the API refuses. The reply text includes the API error code. |
The relay derives an idempotency key from the message bytes and envelope. Resending an identical message without attachments returns the original message ID instead of sending twice.
A message with attachments uploads them again on every attempt, so a retry after a lost 250 reply can send a second copy.