Tips and tricks for scheduling email delivery
Want to schedule emails for a later time? Learn how to do it with Mailgun’s Email API.
PUBLISHED ON
Picture this: You're on vacation, but your email marketers don't want to miss the optimal window to send an email to your subscribers. They need you to get the email out, but between the margaritas, you really don't want to be thinking about work.
At Mailgun, we've got you covered. Schedule your email campaigns with ease using our Email API so your marketing team stays happy with optimized send times. Below, we'll look at the benefits of scheduling email deliveries, then we'll go through a tutorial on how to schedule email messages with Mailgun.
Table of contents
What are the benefits of scheduling email delivery for a particular time?
While some emails need to be delivered as quickly as possible, like error reports, password resets, and welcome emails, other emails should be sent at a scheduled time to be most effective.
For instance, a tech hardware website might want to send their daily deals every day at 8:45 AM, so their customers receive it right when they check their emails before settling into the work grind. The same email is a lot less useful at 5 PM when their subscribers can’t wait to get off of work.
The benefits of scheduling send times are:
Avoid time zone issues: With a scheduled send, you can deliver your email to your subscribers at the appropriate time across different time zones. Instead of sending an email to everyone at your 7 PM (which may be the morning for your subscribers), you can schedule your email to delay delivery until their 7 PM.
Optimize send times to target conversions: Emails sent out on a Friday might be lost as people rush to leave the office. You can use what you know about your users to pick the optimal times to email your subscribers and entice them to click through to your content.
Optimize send times for you: You have a life, too. We understand. And sometimes, you'd rather not work on the weekends even if studies say that's the best time to reach your subscribers. Compose and schedule emails ahead of time to send when you aren't working.
Create consistency: Using the schedule email delivery feature gives you a leg up on sending out emails on a regular schedule in order to keep data consistent and conversions up.
Similar to email automation, scheduled email deliveries are just the next step to enable us to do more in less time – and that works for us.
How do I schedule email deliveries to send later?
Let's see how Mailgun’s Email API squares up to the task if you're looking to optimize your scheduled email deliveries. In the following tutorial, we'll go over how to use the messages endpoint of our Mailgun API to schedule an email blast.
You can adjust to code below with your own details, like your API key and domain name, to send a POST request to the Mailgun API to compose a new email and schedule it for later:
The above request includes the following parameters:
to
(required): Supply one or more email recipient(s) in theto
parameter. This parameter can take a list of emails separated by commas. Check out our documentation on batching and mailing lists for ways to send large email blasts to many recipients.from
(required): Thefrom
parameter indicates the sender of your email.subject
: Supply your email's subject line in thesubject
parameter.text
: Thetext
parameter is a plaintext message you can include in the body of your email.html
: Thehtml
parameter allows you to insert HTML into the body of your email by pasting it between the<html>
tags. Remember, you can also upload your HTML email template using our Templates API and use thetemplate
parameter to call it in this request.o:deliverytime
(required): Theo:deliverytime
parameter is probably the most important part of this API request. This parameter is available when you send emails through our API or SMTP. Use this parameter to specify when you'd like Mailgun to send your message.
When scheduling delivery, dates need to be strings encoded according to RFC 2822. This format is native to JavaScript and is also supported by most programming languages out of the box:
How do I schedule emails to be sent to my subscribers based on their local time zone?
In the tutorial above, we mentioned that it's possible to include a list of emails in the to parameter. Of course, this gets unwieldy when you're trying to send an email marketing campaign to 1000 recipients spread across different time zones.
That's why we created the Time Zone Optimization functionality. Mailgun’s Timezone Optimization feature allows senders to schedule messages to be delivered in a recipient’s local timezone.
When will Mailgun deliver my scheduled message?
Mailgun will make every effort to deliver your emails as close to your specified time as possible, but can't guarantee delivery at a specific time. After all, there are a lot of factors that affect delivery time, including the email content itself. These factors influence how likely email clients like Gmail and Yahoo are to flag it as spam and delay or prevent delivery.
Wrapping up
And that's it! Sip that margarita and keep your email marketers happy as your emails land in your subscribers' inboxes.
In addition to using o:deliverytime
, check out our Email Best Practices to make sure your emails get delivered on time. Or, if you're working with Node.JS, take a peek at our tutorial for scheduling email deliveries. As always, make sure to keep email accessibility in mind.
Don't hesitate to reach out if you have any questions about how Mailgun can support you. We're here to help you send all your emails whenever you need them.