How to use WordPress offline credits

Free WordPress Themes

If you run a WordPress blog these days, you likely plan on building an email list, or you may already have one. More than often, collected e-mail addresses are used for e-mail contact. However, what if WordPress can't successfully send email to your subscribers?

This is where Mailgun comes in. Mailgun then is the perfect solution to help you successfully send emails to your subscribers. Before we see how to use it in WordPress, let's first understand what Mailgun is.

What is Mailgun and how does it work?

Mailgun is an email automation service developed and provided by Rackspace. This service provides a cloud-based email service for sending, receiving, and tracking emails sent through your websites and applications (including WordPress).

Most Mailgun functionality is available through an intuitive RESTful API or through traditional email protocols like SMTP, POP3, and IMAP. This means that no internal PHP email functions are used. This is very useful if you are using shared hosting with limited email service or using WordPress locally (or a PHP application for sending email).

Download Divi The best WordPress theme

The world's most popular WordPress theme and the ultimate wordpress page builder

Download Divi.

The good news here is that this is a service that is available with an ongoing trial offering. By ongoing, we mean it won't run out over time, but you are limited by the number of emails that can be sent. For example, you can send up to 5,000 emails per month (that's enough for new blogs), get accurate reports, and so on. If you need more, you'll get Needed to be updated.

Upgrading offers you many advantages, such as: B. a dedicated IP address that will come in handy over time as some emails sent by Mailgun don't always reach Hotmail (Microsoft email service). The reason for this is that Mailgun is using the same IP for the free plan. This has resulted in the IP being blocked by some services as it is referenced frequently in the spam list. However, this shouldn't be a huge problem for you as it works well for other services.

Let's see how to use it on WordPress.

How to set up Mailgun on WordPress (in 2 steps)

We are going to break this tutorial into two different sections. The first section is created on the Mailgun and your registrar website and the second on your WordPress blog.

1 - Create and use Mailgun account

The first step before sending an email from WordPress is to make sure you have an account created with Mailgun. This should be a pretty straightforward step as it just asks you to provide basic information like email, username and password, payment fields, etc.

Uncheck "Add payment information now" if you do not want to provide your payment information. After registering, you will surely go through the validation process, which consists of activating your account using your email address and phone number. Once activated and connected, you'll land on a similar dashboard.

This dashboard shows the current activity of one of our WordPress websites. It has some interesting metrics like total number of emails sent, total number of bounces, and total deletion (things you can't get with the PHP mail feature).

To continue with the integration with WordPress, let's go to "Submit> Domains". From there you will see an Add Domain button. You should note that if you do not see this domain, you have probably not successfully activated your account.

On the next page you define your domain settings. It is usually recommended to use a subdomain to send emails (useful for troubleshooting). For example, if you have johndoe.com as your main domain, you can use notifications.johndoe.com or mail.johndoe.com.

The other fields have working default values ‚Äč‚Äčthat you can continue with. The next step is to define the DNS settings. This is actually a required step for Mailgun to work. Configuring DNS consists of adding MX, TXT, and CNAME records to your registrar DNS configurations.

We use Cloudflare to manage our domains. The step may be different if you are using a different registrar, but in the end it remains the same steps that you need to follow.

You have to reach the domain of your choice first.

Then you will see the DNS section in the top menu. You have to click on it to reach your DNS settings.

All you have to do then is fill in your configuration. You should note that Mailgun has different configurations that allow different functions. For example, some TXT records allow records to be sent, while others allow records to be received and tracked.

Once you're done, you should wait around 24 to 48 hours to see the changes made. We're not done with the first steps of this tutorial. Let's find out how to configure it in WordPress.

2 - Configuring the Mailgun WordPress plugin

Fortunately, Mailgun created a WordPress plugin that makes it easy to integrate with WordPress. The first thing you need to do now is install the plugin available on WordPress.org. Although it mentions that the plugin hasn't been updated in 3 years, it does the job very well so far.

You can also install the plugin directly from your WordPress dashboard. By finding the term "Mailgun for WordPress" in the search bar.

As soon as the plugin is installed and activated, a new submenu named "Mailgun" is added to the "Settings" menu.

Clicking on this menu will take you to the configuration page where you need to create a match with your actual mailgun details. For example, you need to provide:

  • From the address
  • Of names
  • API key on mailgun settings
  • Mailgun domain

Once you've got these details from Mailgun, don't forget to save your changes in WordPress. From now on, Mailgun is responsible for your emails.

Sum up

While using WordPress, there is a lot of need to send emails to your subscribers. More often than not, if the PHP features provided do the job by default, it's not a good solution for businesses that need tracking tools for their emails. Mailgun is therefore a nice solution that includes a free plan that is good for new blogs.

In this tutorial we noticed that the configuration can be done in two different steps:

  • Create a mailgun account and set up DNS details
  • Install and configure the Mailgun WordPress plugin

Let us know in the comments if this has been helpful to you. If there are any more tips you would like to share with us, don't hesitate.