Matomo Analytics

Documentation

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 Mailg...

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 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, then go to Settings > 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.

Dennis Smink

Written by Dennis Smink

Dennis brings over 13 years of hands-on experience in server management, specializing in optimizing web services for scalability and security.

Ready to dive in?
Start your free trial today.

Create an account and enjoy your 5-day free trial — no credit card required.

Start your free trial