# Transactional SMTP Relay

{% hint style="info" %}
You will only see your API key if you [log in as a user account](/docs/backend-administration/creating-user-accounts.md) on the frontend, if you impersonate a customer account as a backend admin the API key will be blank.
{% endhint %}

In the email marketing platform, go to **Integrate -> API & SMTP -> SMTP Relay** &#x20;

<figure><img src="/files/DIBjIHaz0MH5ZA0Nkis7" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/54zJgqT99VYFlRXNNiYb" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**If you're using Cloudflare for HTTPS, extra steps to** [**enable SMTP Relay** ](/docs/options-for-adding-https/transactional-smtp-relay-requirements-for-cloudflare.md)**are required.**&#x20;
{% endhint %}

{% hint style="warning" %}
**Attachments are currently not supported for transactional mail**

Image attachments will be removed automatically, you need to include images by using regular HTML the usual way.&#x20;
{% endhint %}

{% hint style="info" %}
**Configure your sending application to use your ESP hostname or IP address and ports 587, 2525, or 8025.**
{% endhint %}

{% hint style="info" %}
**To make a secure encrypted connection, use the TLS extension after connecting via regular SMTP. SSL method is not supported.**&#x20;
{% endhint %}

{% hint style="info" %}
**If a multipart message consists of text and HTML parts, only HTML will be used.**&#x20;

Text parts are unsupported.&#x20;
{% endhint %}

{% hint style="info" %}
**Use your API Key for your username and password.**&#x20;
{% endhint %}

{% hint style="success" %}
**The following standard headers are valid in a transactional message.**
{% endhint %}

* **From**: The from name and from email address, aka the 'Friendly From' or 'From Name'.
* **To**: Specify the recipient's name but **not** their email address.&#x20;
* **Subject**: The message subject line.
* **Reply-To**: Include an optional Reply-To address.

{% hint style="success" %}
**The following platform-specific headers are valid in a transactional message.**
{% endhint %}

* **X-Transactional-Tag**: If left blank, the message will be tracked as “untagged” on the transactional dashboard.
* **X-Transactional-Route**: Specifies a postal route to use. This is required if the customer account has more than one postal route available, otherwise, the message will fail.
* **X-Transactional-Template**: Include a template ID if you want to send this message using a pre-created transactional template.&#x20;
* **X-Auth-APIKey**: Bypass the SMTP AUTH username and password method and authenticate via header instead.
* **X-Transactional-Variables**: Specifies a JSON string to use as an input dictionary for the Jinja2 templating system. For more details on Jinja2 see [our API docs](https://app.emaildelivery.com/api/doc#/transactional/post_transactional_send).&#x20;

{% hint style="danger" %}
**All other headers are automatically discarded and ignored.**
{% endhint %}

{% hint style="success" %}
**You can actually use whatever you want for the Transactional SMTP Relay username.** We recommend using the API Key for the username and password for simplicity of explanation, but the username is actually ignored and discarded and can be anything.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emaildelivery.com/docs/transactional/transactional-smtp-relay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
