We're experiencing difficulty. Our engineers are on it. Please check status.mailgun.com for real-time updates.

What is Send Time Optimization?

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?

API

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 `72h`. 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)

 

Example:

 

HTTP API through curl:

curl -s --user 'api:YOUR_API_KEY' \

    https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages \

    -F from='Excited STO User <mailgun@YOUR_DOMAIN_NAME>' \

    -F to=bar@example.com \

    -F subject='This is an STO message' \

    -F html='This message was sent with STO enabled!' \
    -F o:deliverytime-optimize-period='24h' \

    -F o:tag=’STO_enabled’

SMTP

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:

X-Mailgun-Delivery-Time-Optimize-Period: 24h

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)

 

Examples:

 

SMTP MIME

X-Mailgun-Delivery-Time-Optimize-Period: 24h
Date: Tue, 16 Jul 2019 12:56:42 +0000

Sender: user@email.example.com

Message-Id: <20190716125642.1.0B7E027813A586BF@email.example.com>

To: dude@mailgun.com

From: dude@email.example.com

Subject: Hello STO

Mime-Version: 1.0

Content-Type: multipart/alternative; boundary="c1504c4d127d4527acde74be95afc945"

 

--c1504c4d127d4527acde74be95afc945

Content-Type: text/plain; charset="ascii"

Mime-Version: 1.0

Content-Transfer-Encoding: 7bit

 

This should be scheduled to arrive at the best time

 

--c1504c4d127d4527acde74be95afc945

Content-Type: text/html; charset="ascii"

Mime-Version: 1.0

Content-Transfer-Encoding: 7bit

 

<html><body>This should be scheduled to arrive at the best time</body></html>

--c1504c4d127d4527acde74be95afc945--



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.

Powered by Zendesk