fbpx
How to send emails from WordPress using Mailgun and FluentSMTP?
December 15, 2021

Email is a crucial part of every online business. In order to communicate with customers, everyone relies on email, be it an e-commerce store or a corporate website. This article explains how to configure WordPress SMTP to send emails using Mailgun and FluentSMTP.

We also have some articles to set up your email on different platforms other than Mailgun and FluentSMTP :

  1. How To Setup WordPress SMTP For Sending Emails using FluentSMTP | Amazon SES?
  2. How To Create Business Email Address Using Zoho Mail?
  3. How to use Amazon SES to send Emails?

Pre-Requisites to setup Mailgun and FluentSMTP:

  1. WordPress SIte
  2. Domain Name
  3. Cloudflare Account

The first thing you need is a domain name and a Cloudflare account. There’s a tutorial and video here on setting up your domain with Cloudflare after purchasing it from NameCheap. Using this documentation, you can set up a WordPress site on CloudPages.

Setup FluentSMTP On WordPress:

Log in to your WordPress admin dashboard to set up FluentSMTP. From the left menu, select Plugins -> Add New Plugin.

Add plugin

Type FluentSMTP into the search bar of the plugin section to get results and install the FluentSMTP plugin. When you search, the first result you see is the required plugin. To install it, click on the install button.

Type FluentSMTP into the search bar of the plugin section to get results and install the FluentSMTP plugin. When you search, the first result you see is the required plugin. To install it, click on the install button.

Once the plugin is installed now activate this plugin.

Once the plugin is installed now activate this plugin.

Once activated the message to configure the plugin can be found on the top bar.

Click Configure FluentSMTP to set up FluentSMTP and use the plugin for email services. You can skip the first step.

WElcom SMTP

You can see all the email services available to integrate with.

SES

We are going with Mailgun so let’s click on MailGun from the above options.

FluentSMTP options

Now you can see a new form asking for all required information.

Add domain detail

From all these first, let’s go with a Domain Name section to do so just click on the Get a Domain Name button in the right corner.

Domain settings

Add Domain to Mailgun:

Clicking on this button will take you to the Mailgun account page, where you can configure your domain. If you are logged in with your Mailgun account you can see already added domains. You can add a new domain by clicking on the Add New Domain button in the right top corner.  

Add domain

Now here you have to provide all information like your domain name and the region (choose the region carefully an your data will be stored in this region) for the domain name.

Add domain end

After providing all information just click on the Add Domain button. Once the domain is added to Mailgun you have to verify it by adding some DNS records to your DNS manager (in our case our DNS manager is Cloudflare)

Verify Domain Name:

Once you click on the Add Domain button Mailgun will give you some DNS records to add in your DNS manager (these records will make sure that you own the domain and Mailgun is authorized to send emails using this domain)

Mailgun will give you TXT, MX, and CNAME records that you need to add to your DNS Manager. You have to copy all these records and after copying these records you need to add these records in Cloudflare we have a complete article on Cloudflare you can check here. In this article, you can see how you can add any record in Cloudflare.

For this article, we only want to send an email so we just copied TXT records (SPF and DKIM) and CNAME (mail domain record) for tracking. If you want to send and receive the email then you can add MX as well. After adding all records your Cloudflare will look like this.

Cloudflare end records

Note: Always turn off proxy for mail domain

Verify DNS records:

Now go back to the Mailgun and click on Verify DNS settings button.

Verify DNS

 You should see this screen if your DNS settings are correct.

DNS verification done

Setup Mailgun in WordPress:

Now come back to your WordPress Dashboard and go to the FluentSMTP page add the domain name at the required place.

Mailgun and FluentSMTP

Now we also want an API key just click on the Get a Private API key and it will navigate you to the API page and get a key for you.

FluentSMTP also requires Mailgun Private API key click on Get a Private API key and it will navigate you to the API page where you can get the private key.

Private API key Mailgun

Copy the key from here and add it to WordPress. And also provide all information in the boxes.

Information for FluentSMTP

Note: The From Email should belong to the domain you verified above and From Name can be anything.

After adding all details just click on the Save and you are ready to send your first test email.

Settings FluentSMTP

To perform the Test just add all information and click on Send Test Email button.

FluentSMTP

If all is good you can see a successful message like this.

Mailgun and FluentSMTP

If you have any questions, feel free to ask in the comments section below.

Shoaib is our CEO. He loves to write code and occasionally write articles related to WordPress.

Recent Posts

Get Newsletter Updates

10 Most Common WordPress Errors and How to Fix Them

10 Most Common WordPress Errors and How to Fix Them

‘Oops! WordPress dashboard does not work correctly due to unforeseen errors.’ Your smooth and happy day can quickly turn into confusion when you open your WordPress and see this message appear on your screen. It can be pretty frustrating, especially if it is your...

read more
MySQL Performance Tuning Tips For Better Database Optimization

MySQL Performance Tuning Tips For Better Database Optimization

Though MySQL is considered one of the most popular database managers, it still needs to be optimised every once in a while. On the other hand, when we talk about complex and big data sets, you need to optimise for high performance regularly. MySQL performance tuning...

read more
How to Create Image and File Upload in PHP with jQuery AJAX

How to Create Image and File Upload in PHP with jQuery AJAX

The hallmark of the PHP application is that it enables you to upload files from clients to servers. However, you need to be patient to implement features with stress-free configuration and correct security. As a developer, you can use different scripts for PHP file...

read more
How to Join Two Tables in MySQL

How to Join Two Tables in MySQL

To give appropriate content for a WordPress website, MySQL stores data in tables. Irrespective of the prefix, each MySQL database table comprises columns and rows. The columns identify the data type, whereas the rows carry the actual data. In this article, we will...

read more

Comments

0 Comments

Trackbacks/Pingbacks

  1. Is Dropshipping Worth It In 2022? - CloudPages - […] Do check out another great resource on setting up email for your WooCommerse store. […]
  2. [3 Ways] Super Fast Way To Export WooCommerce Orders And Products Easily - […] Order Export For WooCommerce. If you don’t know how to install a plugin you can watch this […]

Submit a Comment

Your email address will not be published.

Subscribe

Join Our Newsletter

Pin It on Pinterest

Share This