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 more
Basic usage
Enable SMTP on your Domain screen 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 Wikipedia or our Knowledge base.
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 via587
port and do not have plans to support older/unsecure protocols for SMTP FROM
email domain must be verified- A subject is required
- All custom headers, apart from the ones mentioned in Additional features, will be dropped
- HTML source might be readjusted if click or open tracking is enabled
- Additional features like advanced personalization or templates are only supported via our Email API
- We only support attachments of the file types as defined in Email API
- There are Rate limits applied to SMTP relay based on IP address and these tend to be lower than available through our API
- SMTP Relay has a single connection transaction limit set at 5. To send bulk emails use our Bulk Email API
- Daily request quota applies to each individual message sent through our SMTP relay service. Be aware that the actual number of requests may vary depending on your SMTP client's email sending method.
- We do not support desktop email clients such as Apple Mail, Outlook, Thunderbird and similar applications.
Note
If you encounter any other problems, or have a feature request, let us know.