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.

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:

  • We only support TLS security via 587 port and do not have plans to support older/unsecure protocols for SMTP
  • FROM email domain must be verifiedopen in new window
  • A subject is required
  • There must be a text/plain or text/html node present in the MIME message
  • All custom headers, apart from the ones mentioned in Additional features, will be dropped
  • HTML source might be readjusted if click or open trackingopen in new window is enabled
  • Additional features like advanced personalization or templatesopen in new window are only supported via our Email API
  • We only support attachments of the file types as defined in Email API
  • We do not support OpenPGP encrypted messages or messages that are sent only with winmail.dat or encrypted.asc as attachments
  • There are Rate limits applied to SMTP relay based on IP address and these tend to be lower than available through our API
  • undisclosed-recipients is not supported as a recipient

Note

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

Last Updated: