SMTP submissions for transactional email

In addition to the HTTP API, Flexmail supports sending transactional email via SMTP. This is useful when your application or platform already has SMTP support built in — a CMS, an e-commerce platform, or a legacy system that sends email through an SMTP relay.

SMTP submission is included in the transactional product at no extra cost. It provides the same delivery reliability and tracking capabilities as the API, with a few differences in defaults and supported features.

Note

SMTP submission is not enabled by default. You need to request access explicitly. See "Requesting access" below.


Requesting access

SMTP access is not enabled automatically when you activate the transactional product. To request SMTP credentials for your account, contact Flexmail support at support@flexmail.eu and include your account ID in the request. Your SMTP username and password will be provided as part of the credentials response.

Note

Your SMTP credentials are separate from your personal access token. The username and password for SMTP are provided by Flexmail upon request — do not use your account ID and personal access token as SMTP credentials.


Connection settings

Once your SMTP access has been granted, use the following settings:

Setting Value
Server submission.flexmail.eu
Port 587
Connection security STARTTLS
Username Provided by Flexmail on request
Password Provided by Flexmail on request

Custom headers

SMTP submissions support several optional custom headers that control message behaviour and tracking. These work similarly to the options available in the HTTP API.

Header Description
X-Flexmail-Tag Add a tag to categorise messages and accumulate stats. Must be in snake_case format (1–50 characters, e.g. order_confirmation).
X-Flexmail-Metadata-{key} Add custom metadata as key/value pairs. Replace {key} with your field name in snake_case. Value must be 1–80 characters.
X-Flexmail-Open-Tracking Set to true to enable open tracking. Disabled by default.
X-Flexmail-Link-Tracking Set to true to enable link tracking. Disabled by default.

Example:

X-Flexmail-Tag: order_confirmation
X-Flexmail-Metadata-order_id: 12345
X-Flexmail-Metadata-customer_id: C-789
X-Flexmail-Open-Tracking: true
X-Flexmail-Link-Tracking: true

Note

Open and link tracking are disabled by default for both SMTP submissions and the HTTP API. Add the corresponding headers if you want tracking enabled.


Message ID and webhook correlation

The original Message-ID header from your submitted email is automatically stored as metadata under the key original_message_id. This lets you correlate webhook delivery events with the messages you sent from your own system.


SMTP vs. the HTTP API

The two methods have some differences in defaults and capabilities:

Feature HTTP API SMTP submission
Open tracking Disabled by default Disabled by default
Link tracking Disabled by default Disabled by default
Original Message-ID N/A Preserved as original_message_id metadata
Inline attachments Supported Not supported
Plain text only email Supported Not supported

Supported features

  • HTML emails with or without a plain text multipart.
  • Open and link tracking (via custom headers).
  • CC and BCC recipients.
  • Attachments — must be base64-encoded. Inline attachments are not supported.
  • Rate limiting per recipient, consistent with the API rate limits.

Requirements

  • The From address must be a verified sender in your Flexmail account.
  • The sending domain must be authenticated with SPF, DKIM, and DMARC, and a return-path must be configured. These requirements are the same as for the HTTP API.

Error handling

Submission errors are reported via an NDR (Non-Delivery Report) sent to the envelope sender address. Bounce events and all other message events are also available through the message details endpoint and webhooks, in the same way as API sends.


Next steps

  • See "Getting started with the transactional API" for the full account setup process.
  • See "Transactional webhooks" to receive real-time delivery and tracking events.
  • See "Transactional troubleshooting" if your SMTP connection or deliverability is not working as expected.
Did this answer your question? Thanks for your feedback There was a problem submitting your feedback. Please try again later.

Didn't find what you were looking for? Contact Us Contact Us