Mailgun's Wordpress Plugin
Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller Tags: mailgun, smtp, http, api, mail, email Tested up to: 6.4.3 Stable tag: 1.9.9 License: GPLv2 or later
Easily send email from your WordPress site through Mailgun using the HTTP API or SMTP.
Mailgun is the email automation engine trusted by over 10,000 website and application developers for sending, receiving and tracking emails. By taking advantage of Mailgun's powerful email APIs, developers can spend more time building awesome websites and less time fighting with email servers. Mailgun supports all of the most popular languages including PHP, Ruby, Python, C# and Java.
One particularly useful feature of this plugin is that it provides you with a way to send email when the server you are on does not support SMTP or where outbound SMTP is restricted since the plug-in uses the Mailgun HTTP API for sending email by default. All you need to use the plugin is a Mailgun account. Mailgun has a free account that lets you send up to 200 emails per day, which is great for testing. Paid subscriptions are available for increased limits.
The latest version of this plugin now supports regions. Select either U.S./North America or Europe to choose the API endpoint from which you will send email.
The current version of this plugin only handles sending emails, tracking and tagging and list subscription.
mailgun
folder to the /wp-content/plugins/
directory or install directly through the plugin installerSettings -> Mailgun
and configure the plugin with your account details== Frequently Asked Questions ==
Your web server may not allow outbound HTTP connections. Set Use HTTP API
to "No", and fill out the configuration options to SMTP and test again.
Your web server may not allow outbound SMTP connections on port 465 for secure connections or 587 for unsecured connections. Try changing Use Secure SMTP
to "No" or "Yes" depending on your current configuration and testing again. If both fail, try setting Use HTTP API
to "Yes" and testing again.
If you have to use SMTP and something is still going horribly wrong, enable debug mode in WordPress and also add the MG_DEBUG_SMTP
constant to your wp-config.php
, like so:
define( 'MG_DEBUG_SMTP', true );
Yes, using the following constants that can be placed in wp-config.php:
Constant MAILGUN_USEAPI
IS REQUIRED
MAILGUN_REGION Type: string Choices: 'us' or 'eu'
ex. define('MAILGUN_REGION', 'us');
MAILGUN_USEAPI Type: boolean Choices: '0' or '1' (0 = false/no)
MAILGUN_APIKEY Type: string
MAILGUN_DOMAIN Type: string
MAILGUN_USERNAME Type: string
MAILGUN_PASSWORD Type: string
MAILGUN_SECURE Type: boolean Choices: '0' or '1' (0 = false/no)
MAILGUN_SECTYPE Type: string Choices: 'ssl' or 'tls'
MAILGUN_FROM_NAME Type: string
MAILGUN_FROM_ADDRESS Type: string
MAILGUN_TRACK_CLICKS Type: string Choices: 'yes' or 'no'
MAILGUN_TRACK_OPENS Type: string Choices: 'yes' or 'no'
mg_use_recipient_vars_syntax
Mutates messages to use recipient variables syntax - see
https://documentation.mailgun.com/user_manual.html#batch-sending for more info.
Should accept a list of To
addresses.
Should only return true
or false
.
mg_mutate_message_body
Allows an external plugin to mutate the message body before sending.
Should accept an array, $body
.
Should return a new array to replace $body
.
mg_mutate_attachments
Allows an external plugin to mutate the attachments on the message before
sending.
Should accept an array, $attachments
.
Should return a new array to replace $attachments
.
mg_use_recipient_vars_syntax
Mutates messages to use recipient variables syntax - see
https://documentation.mailgun.com/en/latest/user_manual.html#batch-sending for more info.
Should accept a list of To
addresses.
Should only return true
or false
.
mg_mutate_message_body
Allows an external plugin to mutate the message body before sending.
Should accept an array, $body
.
Should return a new array to replace $body
.
mg_mutate_attachments
Allows an external plugin to mutate the attachments on the message before
sending.
Should accept an array, $attachments
.
Should return a new array to replace $attachments
.
== Screenshots ==
== Changelog == = 1.9.8 (2024-02-25): =
= 1.9.7 (2024-01-03): =
= 1.9.6 (2023-09-10): =
From mail
= 1.9.5 (2023-06-20): =
= 1.9.4 (2023-06-10): =
Fatal error on lists page when another plugin redeclare wp_mail()
= 1.9.3 (2023-04-08): =
Reply-to
header. It's not overridden anymore= 1.9.2 (2023-03-28): =
mailgun_error_track
h:Sender
= 1.9.1 (2023-03-26): =
Remove not needed error logging.
Fixed bug with Override param for Woocommerce
= 1.9 (2023-01-18): =
Sanitizing and escaping vars. Possible security issues
= 1.8.10 (2022-12-26): =
from name
for Woocommerce= 1.8.9 (2022-12-14): =
= 1.8.8 (2022-12-11): =
$to
override in the wp_mail
function= 1.8.7 (2022-11-12): =
Override "From" Details
was not updated= 1.8.3 (2022-08-30): =
= 1.8.2 (2022-08-24): =
= 1.8.1 (2022-08-19): =
= 1.8.0 (2022-08-18): =
= 1.7.9 (2021-05-24): =
= 1.7.8 (2021-05-13): =
= 1.7.7 (2021-03-16): =
= 1.7.6 (2021-02-19): =
= 1.7.3 (2021-02-19): =
= 1.7.2 (2020-10-07): =
= 1.7.1 (2019-02-07): =
= 1.7 (2019-01-21): =
= 1.6.1 (2018-10-08): =
= 1.6 (2018-9-21): =
= 1.5.14 (2018-09-11): =
= 1.5.13.1 (2018-08-15): =
= 1.5.13 (2018-08-14): =
= 1.5.12.3 (2018-08-09): =
= 1.5.12.2 (2018-08-09): =
= 1.5.12.1 (2018-08-06): =
= 1.5.12 (2018-08-02): =
= 1.5.11 (2018-05-30): =
= 1.5.10 (2017-11-22): =
text/html
emails to send as both text/plain
and text/html
parts= 1.5.9 (2017-09-13): =
= 1.5.8.5 (2017-09-05): =
htmlonly
(https://github.com/mailgun/wordpress-plugin/pull/58)= 1.5.8.4 (2017-06-28): =
= 1.5.8.3 (2017-06-13): =
pt_BR
translations (thanks @emersonbroga)= 1.5.8.2 (2017-02-27): =
mg_mutate_message_body
hook to allow other plugins to modify the message body before sendmg_mutate_attachments
hook to allow other plugins to modify the message attachments before send= 1.5.8.2 (2017-02-27): =
mg_mutate_message_body
hook to allow other plugins to modify the message body before sendmg_mutate_attachments
hook to allow other plugins to modify the message attachments before send= 1.5.8.1 (2017-02-06): =
= 1.5.8 (2017-01-23): =
MG_DEBUG_SMTP
constant= 1.5.7.1 (2017-01-18): =
Undefined property: MailgunAdmin::$defaults
when saving config$mailgun['override-from']
without checking isset
= 1.5.7 (2017-01-04): =
From Address
notephpmailer_init
/ SMTP now will honour Mailgun "From Name / From Addr" settingsundefined variable: content_type
error in wp-mail.php
(https://wordpress.org/support/topic/minor-bug-on-version-version-1-5-6/#post-8634762)undefined index: override-from
error in wp-mail.php
(https://wordpress.org/support/topic/php-notice-undefined-index-override-from/)= 1.5.6 (2016-12-30): =
wp_mail_content_type
(#37 - @FPCSJames)= 1.5.5 (2016-12-27): =
admin_notices
code= 1.5.4 (2016-12-23): =
array()
syntaxwp_mail_from
/ wp_mail_from_name
not working on old PHP / WP versionsmime_content_type
/ finfo_file
= 1.5.3 (2016-12-22): =
array()
syntax for older PHP supportContent-Type
processing code to not make such large assumptions= 1.5.2 (2016-12-22): =
= 1.5.1 (2016-12-21): =
= 1.5 (2016-12-19): =
Mailgun Lists
admin panel bugfix= 1.4.1 (2015-12-01): =
= 1.4 (2015-11-15): =
= 1.3.1 (2014-11-19): =
= 1.3 (2014-08-25): =
= 1.2 (2014-08-19): =
= 1.1 (2013-12-09): =
= 1.0 (2012-11-27): =
= 0.1 (2012-11-21): =