---
title: "How to send emails in WordPress with Mailgun"
url: "https://ploi.io/documentation/deployment/how-to-send-emails-in-wordpress-with-mailgun"
published: "2019-03-25"
last_updated: "2026-06-15"
---

# How to send emails in WordPress with Mailgun

Sending e-mails is easy; getting them reliably delivered is another story. Here's how to send e-mail from WordPress through Mailgun.

1. Create a Mailgun account
---------------------------

Head over to [mailgun.com](https://www.mailgun.com/) and create an account. Mailgun is a paid service with a limited free trial — check their current pricing page for up-to-date limits and rates.

2. Add and verify your sending domain
-------------------------------------

In Mailgun, add your sending domain (for example `mg.yourdomain.com`). Mailgun will give you a set of DNS records to add at your DNS provider — typically a TXT record for SPF, a TXT record for DKIM, MX records, and a CNAME for open/click tracking. Add these records and wait for Mailgun to verify the domain. Delivery won't work correctly until the domain shows as verified.

3. Install and configure the WordPress plugin
---------------------------------------------

Install the official [Mailgun for WordPress plugin](https://wordpress.org/plugins/mailgun/), then go to **Settings &gt; Mailgun** and enter your Mailgun domain and API key. Save, and use the plugin's **Test** button to send a test e-mail and confirm everything is configured correctly.