# Connect SMTP Relay

**Watch our SMTP Relay introduction video then read through our easy to follow documentation with more details below:**

{% embed url="<https://emailteam.wistia.com/medias/rzsbt56zjw>" %}

SMTP Relay is a flexible and universal standard for using any email service provider or 3rd party MTA software as an email delivery engine.&#x20;

All ESPs like SMTP.com or Elastic Email and software such as PowerMTA or MailerQ should be fully compatible.&#x20;

{% hint style="info" %}
**SMTP Relay is only unidirectional**

This means when we pass the message off to your relay service, the delivery progress and reporting is handled entirely on their end. Use the SMTP Relay platform's interface to monitor delivery as no data is relayed back to your platform.&#x20;
{% endhint %}

{% hint style="info" %}
**API integrations are bidirectional**

To track real-time delivery progress natively in your platform including bounce and complaint rates, use an API implementation such as Mailgun, Sparkpost, or Amazon SES.

Velocity MTA also tracks real-time delivery over your own IP Addresses, which comes free with your platform. &#x20;
{% endhint %}

While logged in to the backend as administrator, click the connect menu, select SMTP Relay, then click Add SMTP Relay.

<figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2FR6cBVq5STx10LO6cGQKy%2FScreenshot%202023-06-03%20at%206.22.13%20PM.png?alt=media&#x26;token=0607dc17-51ab-4c02-8f60-3a1d37598549" alt=""><figcaption><p>Backend SMTP Relay menu</p></figcaption></figure>

<figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2FCmyhHxScybXTgKVnip7g%2FScreenshot%202023-06-03%20at%206.22.23%20PM.png?alt=media&#x26;token=57d0b844-32fa-42a5-8c39-859281531d9c" alt=""><figcaption><p>Add SMTP Relay</p></figcaption></figure>

{% hint style="info" %}
**Name**

Give your SMTP Relay connection an internal name, this will only be seen by you and is for management purposes only.
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2FUoqktXyrMQ2p3OkyY6Lk%2FScreenshot%202023-06-03%20at%206.27.52%20PM.png?alt=media&#x26;token=2e29085a-0d04-4dca-a692-8fcb957643c3" alt="" width="375"><figcaption><p>Internal management name</p></figcaption></figure></div>

{% hint style="info" %}
**Hostname**

Enter the hostname your SMTP Relay service accepts connections on. Look this up in their documentation or ask their support team.
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2FEIuGD9wDObTPgGWElWHM%2FScreenshot%202023-06-03%20at%206.28.38%20PM.png?alt=media&#x26;token=06b46969-88db-4702-8aa9-8f0aa2a794e8" alt="" width="333"><figcaption><p>SMTP Relay service hostname</p></figcaption></figure></div>

{% hint style="info" %}
**EHLO**

Use the domain name you'll be sending your email from here, not your admin\_url domain used for your emaildelivery.com platform management, unless they're the same.
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2F7kIhRi2OHXk5xWQvpi1J%2FScreenshot%202023-06-03%20at%206.28.52%20PM.png?alt=media&#x26;token=6ab75be2-15b6-4929-86b0-8100d02596b4" alt="" width="285"><figcaption><p>EHLO hostname</p></figcaption></figure></div>

{% hint style="info" %}
**Enable Authentication**

Most of the time you'll be authenticating using a username and password when using SMTP Relay, however, there are advanced cases where you may authenticate by using your platform's IP address or other methods.
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2FUEcfLXs09g2MDIGnUhml%2FScreenshot%202023-06-03%20at%206.30.26%20PM.png?alt=media&#x26;token=695ec543-90ea-4b61-b355-ac3b7891fab7" alt="" width="240"><figcaption><p>Enable authentication </p></figcaption></figure></div>

{% hint style="info" %}
**SMTP Relay Authentication**

You'll need to check with your SMTP Relay service documentation or support team to find your username and password, as every service uses a different format.

**Examples:** Sendgrid requires username 'apikey', SparkPost requires username SMTP\_Injection, Elastic Email requires your email address as the username.&#x20;

Some services use an API key as your password, some use a password set by you, etc.&#x20;
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2FQA1nUUgfA0IiJtwY1koP%2FScreenshot%202023-06-03%20at%206.30.49%20PM.png?alt=media&#x26;token=dbbdaed5-56a3-476f-8f48-252a4db6fa42" alt="" width="375"><figcaption><p>SMTP Relay username and password</p></figcaption></figure></div>

{% hint style="info" %}
**Encryption**&#x20;

Check with your SMTP Relay service documentation or support team on supported forms of encryption. Using encryption is always better where possible, but sometimes disabling it may be necessary for troubleshooting purposes.&#x20;
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2F3W3HFVeNU1WQWzTuw4lu%2FScreenshot%202023-06-03%20at%206.31.48%20PM.png?alt=media&#x26;token=35f649c6-b88e-41dd-81c4-10dc0daae761" alt="" width="244"><figcaption><p>Supported SMTP Relay encryption methods</p></figcaption></figure></div>

{% hint style="info" %}
**Encryption**&#x20;

Check with your SMTP Relay service documentation or support team on which port to use with your chosen encryption method.
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2FCZmImQcATdgOnSVXjCOW%2FScreenshot%202023-06-03%20at%206.32.01%20PM.png?alt=media&#x26;token=742e9eb3-bf06-4007-9ea6-00361805bc73" alt="" width="228"><figcaption><p>SMTP Relay encryption method port number</p></figcaption></figure></div>

{% hint style="info" %}
**White-label tracking links**&#x20;

Unless you change your link domain, your admin\_url domain will be used for your tracking links in your email messages. You can add a custom link to automatically match your domain branding for mail sent through this SMTP relay connection, no further action is required beyond this step.&#x20;
{% endhint %}

{% hint style="warning" %}
**Make sure you point a DNS A record at your platform IP Address for your tracking link or it will not work**
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2Fbtn6UFhALO4THgPSsFe9%2FScreenshot%202023-06-03%20at%206.32.53%20PM.png?alt=media&#x26;token=38c744f1-e5cd-4121-bb9c-5a1dc567e1e7" alt="" width="337"><figcaption><p>White-labeled custom link domains used in email templates</p></figcaption></figure></div>

{% hint style="info" %}
**Add additional headers**&#x20;

This is an advanced feature you can safely ignore unless you really know what you're doing. It's common for SMTP Relay implementations to allow additional commands and configuration to be executed by including a special email header with instructions in it.

Below is an example from SparkPost's documentation, showing how to enable their open and click tracking on your messages:&#x20;
{% endhint %}

{% hint style="warning" %}
**You normally wouldn't want to do this which is why SparkPost has it disabled by default; open and click tracking is already done through your emaildelivery.com platform.**
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2Fh4MQBAI1yX5dF5Wwasga%2FScreenshot%202023-06-03%20at%206.36.59%20PM.png?alt=media&#x26;token=0617dc35-0000-4fcf-ae87-f456d699ae25" alt="" width="375"><figcaption><p>Example SparkPost header </p></figcaption></figure></div>

{% hint style="info" %}
**PowerMTA Support**&#x20;

The most common way to tell PowerMTA how to handle your mail is by including an X-Virtual-MTA header in your messages, like so:&#x20;
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2F2fMslf5Ql4LikjjX6kIb%2FScreenshot%202023-06-03%20at%206.41.39%20PM.png?alt=media&#x26;token=75263ced-a190-4879-817a-72434c70f93b" alt="" width="375"><figcaption><p>Support for PowerMTA Virtual-MTAs</p></figcaption></figure></div>

{% hint style="info" %}
**Message throttling**&#x20;

Ignore this setting unless instructed otherwise by your SMTP Relay service.
{% endhint %}

<div align="left"><figure><img src="https://2024949584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNgw7cfnOYHQr0B6GDXr%2Fuploads%2F4wKqBVsuelSMdahkY37F%2FScreenshot%202023-06-03%20at%207.27.14%20PM.png?alt=media&#x26;token=a05f45a3-dbb1-4af4-acf6-493aa117038b" alt="" width="375"><figcaption><p>Limit the maximum number of messages sent per SMTP Relay session</p></figcaption></figure></div>

{% hint style="info" %}
**Next Steps**

Return to the [getting ready to send page](https://docs.emaildelivery.com/docs/introduction/getting-ready-to-send) and follow the instructions to start using your newly configured SMTP Relay connection:
{% endhint %}

{% content-ref url="getting-ready-to-send" %}
[getting-ready-to-send](https://docs.emaildelivery.com/docs/introduction/getting-ready-to-send)
{% endcontent-ref %}
