Note: STO is only available on our Scale and Enterprise plans
What is Send Time Optimization (STO)?
We’re all unique individuals, with individual habits. Many of us are creatures of habit (myself included) and check our emails at certain times of the day, and this is where STO comes into play. STO is a Mailgun feature that uses machine learning to determine the best time to deliver a message to a recipient. The idea here is that if we can deliver a message right before a recipient typically checks their email, then the message will be towards the top of the inbox and the user will be more likely to engage with it, thus improving your overall engagement rates and ultimately increasing your ROI through increased conversions.
How does STO work?
Mailgun sends billions of messages a month. Looking at the engagement data over time for these messages allows us to determine individual email engagement habits. When you send a message to a recipient using STO, our algorithm analyzes the data we have on hand for that recipient and calculates the most active time for that recipient. We then schedule that message to target the recipient’s active time.
What kind of results can I expect?
We've seen an average of 5-10% uplift in opens and clicks across senders using STO. With that said, however, results can vary. Ensuring you have Open and Click tracking enabled with Mailgun will ensure we have more data on hand to analyze and therefore make a more accurate decision. Our algorithm will also get more accurate over time as we collect more open and click engagements from your recipients.
How do I use STO?
If you’re integrating with Mailgun via a custom app or via a SaaS provider, then you’re likely using our messages API, and you’ll use STO by passing the `o:deliverytime-optimize-period` parameter to the /messages endpoint, along with a “time window” value.
The value should be set to the number of hours in `[0-9]+h` format, with the minimum being `24h` and the maximum being `168h` (7 days if the domain has a 7-day retention period). This value defines the time window in which Mailgun will run the optimization algorithm based on prior engagement data of a given recipient. After the optimization the message will be scheduled for the time that is deemed to be optimal for that recipient. (Example: if it’s 12:00PM your time and you want to ensure the message is delivered by the end of the day, then you’d provide a 12h value so that the message is delivered by 12:00AM)
HTTP API through curl:
curl -s --user 'api:YOUR_API_KEY' \
-F from='Excited STO User <mailgun@YOUR_DOMAIN_NAME>' \
-F firstname.lastname@example.org \
-F subject='This is an STO message' \
-F html='This message was sent with STO enabled!' \
-F o:deliverytime-optimize-period='24h' \
If you’re sending messages through Mailgun using a Front-end or marketing automation platform (Customer.io, Ongage, etc), then you’re likely using SMTP and you’ll need to provide the following custom MIME header and value:
The 24h value provided above represents the time window in which Mailgun will run the optimization algorithm based on prior engagement data of a given recipient. After the optimization the message will be scheduled for the time that is deemed to be optional for maximum user engagement. The value should be set to the number of hours in [0-9]+h format, with the minimum being `1h` and the maximum being `24h`. (Example: if it’s 12:00PM your time and you want to ensure the message is delivered by the end of the day, then you’d provide a 12h value so that the message is delivered by 12:00AM)
Date: Tue, 16 Jul 2019 12:56:42 +0000
Subject: Hello STO
Content-Type: multipart/alternative; boundary="c1504c4d127d4527acde74be95afc945"
Content-Type: text/plain; charset="ascii"
This should be scheduled to arrive at the best time
Content-Type: text/html; charset="ascii"
<html><body>This should be scheduled to arrive at the best time</body></html>
How should I use STO in a testing scenario?
When sending a new variation of your campaigns, it’s always important to A/B test. This is no different with STO. We highly recommend A/B split testing your sends when using STO, if you have the capability. In addition, we recommend using unique tags for each segment, which will allow you to analyze the data once your sends are complete using our Analytics platform.
When performing an A/B test, it’s important that you’re using statistically significant data. One of our partners, Customer.io, wrote a great article outlining how to get conclusive results from your A/B test.