Configure Mailgun in FluentSMTP to Send Emails

Mailgun is one of the best transactional email API service for WordPress. In this article, you will learn how to use MailGun mailer with FluentSMTP.

Configuring FluentSMTP for MailGun #

Hover over Settings on WordPress Admin and go to FluentSMTP Dashboard. If this is the first time you are using FluentSMTP and haven’t set up any connection yet, you will see the list of available Mailer, as we will work with MailGun, select MailGun from the list.

Configure Mailgun in Fluent SMTP to Send Emails

If you already have one or multiple SMTP driver setups and now you want to add MailGun also then go to the Settings Tab of FluentSMTP and select Add New Connection. Now again all the available mailer will appear from where you need to select MailGun

Configuring Fluent SMTP for MailGun

Sender Settings #

Now we will need to configure the sender details. Fill up the “From Email” and “From Name”

From Email: The “From Email” should be the email you verified with MailGun. Check the box to set the return path to match the from. The Return Path indicates where non-delivery receipts or bounce messages are to be sent. If unchecked, bounce messages will be lost. With this enabled,
you’ll be emailed using “From Email” if any messages bounce as a result of issues with the recipient’s email.

From Name: From name can be anything you want. You can use a combination of your name and company name. For example, I would choose something like “Jafor From WPManageNinja” where Jafor is the name and WPManageNinja is the company. The API key will be provided by MailGun.

Get MailGun Private API Key and Domain Name #

Log into your MailGun account and click on Settings. Now select API Keys. Copy the Private API Key from here and paste it into the FluentSMTP Private API Key filed of MailGun configuration.

Where Can I Find MailGunAPI Key and SMTP Credentials

Also, get a verified domain name from MailGun. To get a domain name visit here Learn more about the Domain.

After getting the domain and private API key, go back to FluentSMTP’s MailGun configuration panel and enter the domain and API key. Your MailGun Driver is ready to send emails from your website.

Send a Test Email #

Go to the Email Test Tab and type your “From Email”. This should be the same “From Email” of your MailGun setup. If you get a success message as shown below then your MailGun SMTP setup is working.

send test email from Fluent SMTP

Latest comments (3)

Avatar for Rory Mullin
Rory Mullin

I am getting the following error after setting up with mailgun and submitting a test email:

Oops! PHPMailer is modified by WPMailSMTP\MailCatcher.

I do have the mailgun plugin installed for other functionality on the site, and it was working fine. (I haven’t tested it since setting up fluentSMPT.

Any thoughts?