Overview
Mailgun for WordPress describes itself as: “Easily send email from your WordPress site through Mailgun using the HTTP API or SMTP.”
It is active on 70,000+ WordPress sites and rated 3.8 out of 5 by 49 users on WordPress.org. Developers can extend it through 4 actions and 11 filters, listed below.
How to install Mailgun for WordPress
- Open the plugin installer. In your WordPress dashboard go to Plugins → Add New Plugin.
- Search for it. Type “Mailgun for WordPress” and pick the one by Mailgun.
- Install and activate. Click Install Now, then Activate.
Install with a zip file or WP-CLI
Download the zip from the WordPress.org plugin page, then go to Plugins → Add New Plugin → Upload Plugin, choose the file and click Install Now. Or from the command line:
wp plugin install mailgun --activateRequirements: WordPress 5.6+ · PHP 7.4+ · tested up to WordPress 7.1.4
Hooks & customisation
Mailgun for WordPress 2.2.3 fires 4 actions and 11 filters. Use them from your child theme or a snippets plugin to change how it behaves without editing its files.
// Fires after PHPMailer is initialized.
do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
// Filters the default wp_mail() charset.
apply_filters( 'wp_mail_charset', $charset );
// Filters the wp_mail() content type.
apply_filters( 'wp_mail_content_type', $content_type );
// This filter is documented in wp-includes/pluggable.php
do_action( 'wp_mail_failed', new WP_Error('wp_mail_failed', $e->getMessage(), $mail_error_data) );
// Filters the email address to send from.
apply_filters( 'wp_mail_from', $from_email );
// Filters the name to associate with the "from" email address.
apply_filters( 'wp_mail_from_name', $from_name );Need Mailgun for WordPress customised?
Tell us what you want changed, added or fixed and we'll reply with an estimate.
WP EXPERTS is independent and not affiliated with Mailgun. Plugin names and logos belong to their owners. Version, rating and install figures from WordPress.org, checked Nov 17, 2026.