How to Send Ninja Forms Email with Mailgun

Trouble with emails not sending? Want to send test mail from a development/local environment? Just looking to upgrade how your site handles email? If any of these are true for you, keep reading! Learning to send Ninja Forms email with Mailgun provides you with a remedy for each.  Let’s dive in, introduce you to the Mailgun service, and learn to send Ninja Forms email with Mailgun!

What’s a Mailgun?

When I first heard about Mailgun it conjured images of the Golden Gun from 007 lore… probably because of all the time spent playing Goldeneye on the N64… but I digress. Fortunately, the actual Mailgun service is far more practical and much less campy.

mailgun logo ninja forms emailMailgun is a transactional email service that will literally change the way your email is handled for the better. Ordinarily, Ninja Forms passes the form data collected in your email action off to your WordPress install, which then hands it off to your host to be packaged and shipped. Mailgun takes over the responsibility of actually packaging and sending the mail from your host.

How is this better? Your host is something of a jack-of-all-trades where your website is concerned. They wear a lot of hats: keeping your servers running smoothly, maintenance, email, quite a good many other jobs to boot. Mailgun is a specialist. They have one job. Make sure your email gets where it needs to go.

Their service is geared towards developers, but don’t let that scare you. It’s super simple to set up, but packs the power and reliability of a tool made for pros. It really is something of a Golden Gun for email! There’s even an official WordPress plugin to make setup super simple for all of us non-developer type folk 🙂

Setting up Mailgun to Send Ninja Forms Email

As far as setting up alternate means of handling email in WordPress is concerned, Mailgun is pretty easy to get working. Much easier than some of the SMTP plugins out there I’ve tested. In the following walkthrough I’ll be setting up a local sandbox domain for testing purposes. The steps are virtually the same for a live domain. Let’s do this!

1) Install the “Mailgun for WordPress” plugin from the WordPress Plugin Repository.

2) Create a free account on Mailgun.com

3) After signing up, you’ll be guided through Mailgun’s account setup process. Complete that process with them, and once it’s set up I’ll show you where to grab the relevant info that needs to be put into the Mailgun plugin settings. Be sure to check your email to verify your account via the confirmation mail they will send at this point.

4) Now, in your WordPress dashboard, navigate to Settings>Mailgun. You’re looking for two fields in the settings: Mailgun Domain Name and API Key.

sending ninja forms email with mailgun, mailgun settings, domain name and API key input settings fields

Next hop back over to your actual Mailgun account. Click onto the Domains tab, then click the little gear icon you see in the menu:

ninja forms email with mailgun, mailgun domain settings page

After clicking the gear, select the Domain Settings option from the popup/dropdown menu that displays. That takes you to this page:

ninja forms email with mailgun, mailgun domain name and api key information

There you’ll find the Mailgun Domain Name and API Key that we need to enter into Settings>Mailgun as mentioned above.

5) Make any other adjustments that you want to make here, though you’ve completed the only two inputs that you needed to make here for the plugin to take over email duties. Finally, scroll to the bottom of the page and click the Test Configuration button. You’ll receive an email saying you’re good to go, and… you’re good to go!

That’s It!

Mailgun provides great reliability for your live site or the perfect option for testing in a local development site. Let us know about your experience with the service! We recommend Mailgun frequently for support issues involving email, and your feedback is incredibly valuable to us. If you landed here after searching for help with Ninja Forms email, be sure to check out our comprehensive email troubleshooting guide while you’re at it. Questions? Ask away in the comments below!