What is an SMTP server?
A Simple Mail Transfer Protocol (SMTP) is a form of communication between servers used to send and receive email. SMTP servers require authentication in the form of a username, password, IP address, ports, and security protocol (typically SSL or TLS).
Mailtarget provides you with all of the important details inside your account after you've added and authenticated a domain name. From there, it’s easy to start sending via your application's SMTP email client.
Why use our SMTP server?
Managing your own SMTP servers can be time-consuming and costly. Whether you’re looking to cut back on ownership costs or future-proof your email program, our cloud-based SMTP service is a great solution for you.
Rather than footing the bill for things like hardware and maintenance, Mailtarget takes care of the details by managing all of that internally and in-house so you can focus on your core business.
Alongside our SMTP servers, Mailtarget provides:
Real-time email tracking and advanced analytics of your email program.
Detailed logs to diagnose issues in sending emails.
Advanced deliverability features to reduce bounce rates and spam complaints.
Easy connection with MBPs like Gmail and Yahoo over TLS.
Client configuration
To use Mailtarget as an SMTP relay you need to point your SMTP client or local MTA to the following endpoint:
NAME | VALUE | NOTES |
Host | smtp.mtrgt.net | - |
Port | 587 | - |
Encryption | STARTTLS | - |
Authentication | AUTH LOGIN | - |
User | smtp_mt_injection | - |
Password | An API key with "Send via SMTP" permission | You can create and manage your API Keys from the app |
Per-command Timeout | Minimum 60 seconds | See RFC-5321 for RFC recommended values. |
You can test our smtp connection using swaks:
swaks --to [email protected] \
--from [email protected] \
--auth --auth-user= smtp_mt_injection \
--auth-password=API_KEY \
--server smtp.mtrgt.net:587 \
-tls
SMTP security
Mailtarget strongly recommends using TLS with SMTP to protect your message content, recipient information and API keys in transmission. This includes API keys and any details such as recipient email addresses and message content.
If TLS is not supported by your application, Mailtarget recommends using API keys with only the Send via SMTP privilege enabled. It is also good practice to regularly cycle your API keys to limit exposure of keys sent in the clear. API keys should be treated like passwords.
As stated in our Terms of Use, you "are solely responsible for all use of [your account]." That includes use of your account with API key compromised on an unsecured connection.
Open and Click tracking
SMTP click and open tracking is disabled by default. To enable click and open tracking in SMTP messages, add the X-MT-ATTR header as follows:
X-MT-ATTR: { "optionsAttributes" : { "openTracking" : true,"clickTracking" : true }}
The openTracking and clickTracking variables may also be set account-wide in your SMTP relay account settings.
The sandbox domain
The sandbox domain sandbox.mailtarget.co is available to Mailtarget production environment only. It’s available to allow each account to send test messages in advance of configuring a real sending domain.
Sending messages with cc & bcc
When submitting an email via SMTP that includes the X-MT-ATTR header, you may specify a JSON array for cc & bcc. For each address in each of these arrays, a message will be generated. Messages will be generated with the following headers:
It is the responsibility of the user to include their own To header in the body of the message.
All messages will display the Cc header and the value of that header will include all addresses listed in the Cc array.
The Bcc recipients will each receive a message with the To and Cc headers described above and, additionally, will see a Bcc header with ONLY their own recipient address as the value of the header.
The archive recipients will each receive a message with the To and Cc headers described above however, they will not have a Bcc header.
The following are key points about reporting and tracking for cc, bcc, and archive messages:
Each recipient (to, cc, and bcc) is counted as a targeted message.
A transmission_id field is available during events through the Webhooks, which can be used to correlate the cc and bcc versions of the messages to one another.
Each recipient will only receive a single instance of each message, even if they appear on more than one of the cc or bcc recipient lists.
SMTP error
If you send mail through SMTP rather than REST, there are a few errors that are specific to Mailtarget. The list below covers each of them, as well as what to do when you receive them. Please contact us for error messages that are not listed below.
Response | What it means | How to correct it |
535 5.7.8 Sorry. *** No authentication type succeeded | There is some problems with the authentication credentials. API key, user name, etc. | Confirm that the API key has the Send via SMTP permission and the user name SMTP_Injection. |
550 5.6.0 JSON parsing error in X-MT-ATTR | The X-MT-ATTR header is malformed in some way. | Fix the header's json. The error message usually supplies additional details about the problem. |
550 5.7.1 Unconfigured Sending Domain <admin.example.com> | The domain part of the "From" address isn't a configured sending domain. | Use a "From" address that uses a configured sending domain. See Creating Sending Domains if you need to create a sending domain. |