# Transactional SMTP Relay

{% hint style="info" %}
You will only see your API key if you [log in as a user account](https://docs.emaildelivery.com/docs/backend-administration/creating-user-accounts) 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="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2F4ls4UMR1IYHYa33oJuXt%2Fimage.png?alt=media&#x26;token=e35af455-f425-4ba2-8616-5121a009320a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2FnWb5s21oQGUIcJ5DDfsj%2Fimage.png?alt=media&#x26;token=2d75eec1-156e-4179-b90d-dffdccf4d911" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**If you're using Cloudflare for HTTPS, extra steps to** [**enable SMTP Relay** ](https://docs.emaildelivery.com/docs/options-for-adding-https/transactional-smtp-relay-requirements-for-cloudflare)**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 %}
