SMTP relay

Use Simple Mail Transfer Protocol (SMTP) when you want to quickly send emails using a reliable Internet standard. Our SMTP relay service takes care of your email delivery so you don’t have to manage an email server.

Note

Starting June 3, 2024, MailerSend will no longer support TLS versions 1.0 and 1.1 for SMTP relay. We will exclusively support TLS versions 1.2 and above. This update is crucial for aligning with industry best practices for security and data integrity. Learn moreopen in new window

Basic usage

Enable SMTP on your Domain screenopen in new window and input the details into your SMTP client. Please refer to the documentation of your SMTP client for instructions on the exact way to set it up.

Note

Your client must support TLS security via port 587.

Tracing back SMTP messages to use with the API

Whenever a message is successfully parsed and queued in our system, you will get a similar response to this:

250 Message queued as 61eec2dc16ae8b627a4b87e7

Where 61eec2dc16ae8b627a4b87e7 will be a unique ID and you can track it back this to our Messages API.

For directions on how to collect this information, refer to your SMTP client documentation.

Understanding error messages

We use the same validation mechanisms for SMTP relay, which returns a string of concatenated validation errors with a 450 SMTP code, similar to this:

450 The given data was invalid. You must provide one of html, text or template_id.,You must provide one of html, text or template_id.,You must provide one of html, text or template_id.

You can refer to our Email API for the exact reasons behind errors that happen during validation.

Note

For other possible SMTP codes, you can consult a source like Wikipediaopen in new window or our Knowledge baseopen in new window.

Additional features

Custom tags

You can add a header to an SMTP message you send as follows:

X-MailerSend-Tags: "tag 1, tag 2, tag 3"

You can send a maximum of 5 tags.

Note

This header must reside in the main MIME header node and not in additional MIME nodes like text/plain or text/html.

Limitations

Most of the limitations that are in place for Email API endpoints are the same for SMTP relay.

These are the limitations that our users should be aware of:

Note

If you encounter any other problems, or have a feature request, let us knowopen in new window.

Last Updated: