MyListing Club

Implement a Reliable Email Delivery System for MyListing Using Mailgun

Building better MyListing websites. One guide at a time.

Table of Contents

Overview

Our Implement a Reliable Email Delivery System for MyListing Using Mailgun guide will show you how to easily implement this solution to send your customers email with confidence.

If you’ve ever had customers tell you that your website’s transactional email is constantly ending up in their SPAM/Junk folders or not received at all, this guide is definitely for you.

Transactional Email Types

  • Receipts and Confirmations (ex. Order confirmations).
  • Explicit Requests (ex. Password resets).
  • Account Alerts (ex. Failed payment attempts).
  • and more.

Mailgun Pricing

Free Plan

Mailgun signup is simple and they have a FREE plan/trial that includes 5,000 emails for the first 3 months, which is good for testing or for those just starting out with their MyListing website.

  • 5,000 messages/month are included.
  • There is a limit of 300 messages per day on the included sandbox domain.
  • Data retention for Logs and the Events API is 1 day
  • You cannot create custom domains.
  • You can only send to Authorized Recipients, and there is a maximum of 5 Authorized Recipients.

Flex Plan

If you opt to enter your credit card, after the trial period (the first 3 months) has ended and if you haven’t opted to upgrade into one of our subscription plans, you’ll continue on Flex (i.e. pay-as-you-go) plan, in which you’d pay for any messages you send at a rate of $0.80/1,000 messages.

Flex Plan Highlights:

  • No daily sending limit.
  • 5,000 FREE messages a month for the first 3 months.
  • 5-day data retention for logs and the Events API.
  • Custom domains.
  • Use of Authorized Recipients is not required to send with custom domains.

Activate Your Account

For this guide, we jumped right to the Flex plan, so we could configure a custom domain, and because the pricing is so inexpensive, even if there were overages.

  1. Sign up for Mailgun.
  2. Enter payment information, unchecking the ‘Add payment info now’ box, unless you are comfortable with automatically being billed after the 3-month trial has ended.
  3. Click the ‘Create Account’ button and verify your account, using the email that Mailgun sends out.

Add and Verify Your Domain

After activating your account, Mailgun will drop you into your dashboard, where you will continue on with the instructions below.

  1. From your Mailgun dashboard, add your custom domain.
  2. Enter your domain name.
  3. Choose your Domain region to send mail from.
  4. Choose the strongest key length that your email system supports. (Note: Stick with the default option of 1024 if you don’t want to take the time to at least investigate implementing the stronger 2048 key length.).
  5. Click the ‘Add Domain’ button.

DNS Setup

  1. Go to the DNS provider you use to manage the domain you’re adding to Mailgun. (Note: Mailgun provides some links to some common DNS providers, so you might be able to save a bit of time.).

Pro Tip: Cloudflare is our recommended provider for the fastest DNS services and we’ve written a comprehensive guide for MyListing website owners.

  1. Add the DNS sending records that are provided by Mailgun. (Note: Most website owners will be able to skip the MX records, as those should already be added for use with solutions like Microsoft 365, Google Workspace, etc.).
  2. Click the ‘Verify DNS Settings’ button, once all the desired DNS records have been added. (Note: It can take up to 48 hours for the DNS settings to propagate across the web and that is why we highly recommend Cloudflare, as it propagates almost instantly.).
  3. Continue clicking on the ‘Verify DNS Settings’ button, until Mailgun kicks you into their ‘Overview’ page, which means your DNS has been properly validated. (Note: You will also receive an email notification once DNS is ready to go.).

SPF Records

If you already have SPF records configured within your SMTP email service (Microsoft 365, Google Workplace, etc.) prior to setting up Mailgun for your domain, you’ll get a message saying that you can only have a single SPF record per domain.

Not to worry, as all you need to do is combine your SPF records into a single record.

For example, with Microsoft 365, you’ll have an SPF record of v=spf1 include:spf.protection.outlook.com -all and for Mailgun, you’ll have an SPF record of v=spf1 include:mailgun.org ~all, so you will combine them to be as shown below.

v=spf1 include:mailgun.org include:spf.protection.outlook.com -all

Sending API Keys

If you are setting up Mailgun for a handful of websites, using your account’s Private API key (the one created by default) is just fine.

Meaning, if the API key gets compromised, it would just be a matter of generating a new key and updating the key on your websites.

However, if you are managing say 10 or more websites or websites for clients, it would be a good idea to generate a Sending API Key for each website.

  1. Mailgun Dashboard > Sending > Domain Settings.
  2. Select a domain.
  3. Click on the ‘Sending API keys’ tab.
  4. Click on the ‘Add sending key’ button.
  5. Enter a sending key. (Note: Just keep the key super short and simple, as Mailgun will automatically generate a highly-secure/complex API key for you.).
  6. Click the ‘Create sending key’ button.
  7. Click the copy icon next to your new API Key and paste it into your website, which is covered in the following section.
  8. Rinse, repeat, for additional domains.

Configure Mailgun for WordPress

  1. Install and activate the official Mailgun plugin.
  2. Pull up the settings area of the plugin.
  3. Select Your Region > Ensure this setting matches what you chose in your Mailgun dashboard.
  4. Mailgun Domain Name > Ensure this setting matches what you chose in your Mailgun dashboard.
  5. API Key > Grab your Private API Key from your Mailgun dashboard (User Avatar > API Keys) and paste it here.
  6. From Address > Add an email address that matches your custom domain name (e.g. [email protected]).
  7. From Name > Add a name that matches your brand or business name (e.g. MyListing Club).
  8. Override “From” Details > Set to ‘Yes’.
  9. Click the ‘Save Changes’ button.
  10. Click the ‘Test Configuration’ button.

If everything is configured correctly, you should receive a ‘Mailgun HTTP API Test Success; status “Success”‘ message.

You will also receive an email that confirms sending is working, which region Mailgun is sending from and which method (e.g. HTTP API) is being used.

At this point, all transactional emails (order information, subscription information, password resets, etc.) are automatically sent through Mailgun.

Multiple Domains Under One Account

The following steps show how to include additional domains under a single Mailgun account.

  1. Repeat the steps from the ‘Add and Verify Your Domain’ section, above.
  2. Repeat the steps from the ‘Configure Mailgun for WordPress’ section, above.
  3. Rinse, repeat, for any additional domains you would like to add.

Remove a Website From Your Account

If you have an account where you are managing multiple domains, the following steps help you to remove a specific domain, while keeping your Mailgun account active.

  1. Mailgun Dashboard > Sending > Click on the domain.
  2. Expand the ‘Sending’ menu item.
  3. Click ‘Domain Settings’.
  4. Advanced > Deleted Domain > Click ‘Delete’.
  5. Remove all Mailgun DNS entries from wherever you manage your DNS.
  6. WordPress Dashboard > Remove the Mailgun plugin.

Wrap Up

Getting ahead of your transactional email delivery issues is super important for your company’s reputation and internal success.

Mailgun’s Flex pricing is extremely low-cost, for what you get, so we see no downsides to implementing this solution on your MyListing website.

WooCommerce Subscriptions Ready

The latest version of the WooCommerce Subscriptions plugin is included (unlicensed) and once you have a Starter Site in hand, you can easily put in your own pricing, package features, graphics, etc.

Should you not wish to use WooCommerce Subscriptions, you can simply turn the Listing Subscription packages into standard MyListing packages in just a few clicks and be on your way.

  • Custom WooCommerce Endpoint Design
  • WooCoommerce Subscriptions Setup
  • Listing Subscription Packages
  • Listing Subscription Switching
  • Stripe Payment Gateway Plugin
  •  and more…

Note: The latest version of the WooCommerce Subscriptions plugin is included, but you need to purchase your own license or sign up for a qualifying MyListing Website Care plan if you wish to receive future plugin updates and support.

Premium Assets

Get licensed, premium plugins, valued at over $600 in the first year alone, making a Starter Site investment a no-brainer.

You will get licensed copies of all the plugins listed below, with the exception of the WooCommerce Subscriptions and WooCommerce Product Vendors, and the licenses are yours to keep, for as long as the plugins remain on your website.

  • Admin 2020 ($39)
  • Crocoblock Suite ($130)
  • Elementor Pro ($49)
  • Perfmatters ($25)
  • Permalink Manager Pro ($45)
  • SEOPress Pro ($39)
  • WooCommerce Product Vendors ($79) 
  • WooCommerce Subscriptions ($199)
  • WP Rocket ($49)