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 From header 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 in To or Cc keeps 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-To address, custom X- headers, and List-Unsubscribe with one-click List-Unsubscribe-Post are 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, and References headers are not preserved. Ternwire assigns its own message ID.

Replies and retries

ReplyMeaning
250 Queued as msg_...The message was accepted. Track it with that ID.
451, 452Temporary, such as rate limiting or an attachment check that has not finished. Retry later. SMTP clients and mail servers do this automatically.
535The password is not a valid API key with sending access.
550A recipient is suppressed.
552The message, its body, or an attachment is too large.
554Permanent, 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.