Send Emails with Mandrill

Descrição

Did you find this plugin helpful? Please consider leaving a 5-star review.

Note: This is a forked version of the now unsupported wpMandrill plugin. The notes below are copied over from the original plugin and will be updated as relevant updates become available. Please help by contributing to the GitHub repository Send Emails With Mandrill on GitHub

This plugin uses Mandrill API to send outgoing emails, with or without attachments, from your WordPress installation. It replaces the wp_mail function included with WordPress.

Emails are tracked and automatically tagged for statistics within the Mandrill Dashboard. You can also add general tags to every email sent, as well as particular tags based on selected emails defined by your requirements.

You can also use your own templates that have been added to your MailChimp account and shared with your Mandrill account.

There are a few levels of integrations between your WordPress installation and this plugin:

  1. The simplest option: Install it, configure it, and Send Emails with Mandrill will start sending your emails through Mandrill.
  2. If you need to fine tune certain emails, you can change any email by creating a filter for the mandrill_payload hook.
  3. For further customization, we’ve exposed a function that allows you to send emails from within your plugins, instead of the regular wp_mail function: wpMandrill::mail

Enable the connection by entering a valid API key in the settings page or adding the line define('SEWM_API_KEY', '{YOUR_API_KEY}') your site’s wp-config.php file.

Spanish translation available.

Request

If you find that a part of this plugin isn’t working, please don’t simply click the WordPress “It’s broken” button. Let us know what’s broken in its support forum so we can make it better. Our mind-reading device still needs some tweaking.

Localizations

Send Emails with Mandrill is currently localized in the following languages:

  • Spanish (es_ES)

Known Issues

  • Daily statistics will show data for the first 20 senders (emails) registered.
  • Daily statistics will show data for the first 40 tags registered.

If your account has more than 20 senders registered or more than 40 tags used, the detailed daily statisticas might show incompleted data.

Imagens de tela

  • Settings screen
  • Statistics
  • Dashboard widget
  • Dashboard widget Settings

Instalação

  1. Upload Send Emails with Mandrill to the /wp-content/plugins/ directory
  2. Activate the plugin through the Plugins menu in WordPress
  3. Configure plugin in Settings > Mandrill

FAQ

Why do I need a Mandrill API key?

In order to use this plugin, you have to provide one of your Mandrill API keys. That’s currently the only way we can get access to your Mandrill account.

Do I need a MailChimp account?

Yes. If you aren’t currently on a MailChimp Monthly Plan, you’ll first need to upgrade or switch to a Monthly Plan. Once you have upgraded you can follow the steps here to add Mandrill to your account.

Are all emails routed through Mandrill?

Yes. We try to send every single email sent through your WordPress installation. We also try to process your headers and attachments.

If the sending fails for any reason, the plugin will try to send it again using the WordPress wp_mail function.

What if I need to send some of my emails using the native wp_mail() function?

Use the mandrill_payload filter and add a new parameter called ‘force_native’ to the $message variable, and set it to true:

$message[‘force_native’] = true;

My emails are broken and show weird CSS code

In version 1.09, we added a setting that allows you to tell the plugin if you want to replace your line feeds by
. Try playing with that switch.

If it works for certain emails but doesn’t work for others, you might want to modify this setting using the mandrill_nl2br filter. For example, if you don’t want to use this filter for the “forgot password” emails, add something like this to your theme’s functions.php file:

function my_function($nl2br, $message) {
if ( in_array(‘wp_retrieve_password’, $message[‘tags’][‘automatic’]) ) {
$nl2br = false;
}
return $nl2br;
}
add_filter(‘mandrill_nl2br’, ‘my_function’);

Is there any way to check what’s going on?

If we couldn’t send your email through Mandrill, we’ll try to leave the Mandrill response in your server’s log so that’s your first stop.

Additionally, if you set the WP_DEBUG constant (defined in your wp-config.php file) to true, you’ll see some messages added by the plugin in key parts of the process.

I am getting an Invalid API Key message and I’m sure my API is valid!

Please verify the following:

  1. That your API key is active (this can be viewed on the SMTP & API Credentials page in your Mandrill account);
  2. That your web server has either cURL installed or is able to use fsock*() functions (if you don’t know what this means, you may want to check with your hosting provider for more details);
  3. That the domain name you’re using above is listed in the Sending Domains for your Mandrill account.

Avaliações

27 de Outubro, 2023
I had trouble integrating Mandrill manually, but this plugin was a fantastic find. Despite my initial concerns about its lack of recent updates and a small support team, I’m happy to report that it worked perfectly. I highly recommend this plugin for Mandrill setup—it’s easy to use and flawlessly effective.
28 de Abril, 2020 1 reply
Great that this plugin got a second life! It beats tons of other SMTP plugins trying to support mandrill. It needs a few updates to be fully PHP7.4 compatible and it would be great to have a few extra options (thing return_path_domain etc). On that note: I can help if that would in this great effort!?
14 de Janeiro, 2020 1 reply
The old unsupported Mandrill app had begun causing errors on our website. It caused issues with our WooCommerce installation. Luckily we found this plugin just in time to fix all of our problems. Thank you! Thank you!
Leia todas as 10 avaliações

Contribuidores e desenvolvedores

“Send Emails with Mandrill” é um software com código aberto. As seguintes pessoas contribuíram para este plugin.

Contribuidores

“Send Emails with Mandrill” foi traduzido para 1 localidade. Obrigado aos tradutores por suas contribuições.

Traduzir “Send Emails with Mandrill” para o seu idioma.

Interessado no desenvolvimento?

Navegue pelo código, dê uma olhada no repositório SVN ou assine o registro de desenvolvimento via RSS.

Registro de alterações

1.4

  • Added action hook for monitoring Mandrill API response
  • Added nonce to stats AJAX call

1.3.1

  • Check for error messages parameters before processing (was throwing an error)

1.3

  • Added setting to turn off Dashboard Widget
  • Added ability to manually fetch new data from Reports screen
  • Added ability to define API key as SEWM_API_KEY in wp-config.php file
  • Minor error handling adjustments

1.2.13

  • Setting to disable
    setting for WooCommerce emails due to layout issues from recent WooCommerce updates

1.2.12

  • Updates to deprecated jQuery functions

1.2.9

  • Removed deprecated contextual_help() function and added add_help_tab()

1.2.8

  • Add wpmandrill_enable_reports and wpmandrill_enable_widgets filters to programmatically disable the reports dashboard and widget if desired.

1.2.7

  • Removed code added for previous Mandrill outage

1.2.6

  • Updated messaging on how to handle the upcoming Mandrill outage
  • Bug fix for memcache overload when loading Mandrill reports page on high traffic sites

1.2.5

  • Updated plugin screenshots for WordPress repository
  • Added support/setting for Mandrill subaccount
  • Removed discontinued Mandrill API endpoint support (URL tracking)

1.2.4

  • Removed RSS Feeds due to WordPress core bugs (SimplePie library)
  • CSS adjustments
  • Fixed false negatives when used in conjunction with Contact Form 7 and other mail sending programs

1.2.3

  • Fixed WooCommerce checkout issue (class scope bug)

1.2.2

  • More detailed error logging for failed e-mails
  • Added email formatting to include ‘name’

1.2.1

  • PHP warning fix

1.2

  • Added ability to override wp_mail_native function with a WordPress action
  • 404 console fixes
  • Various undefined variable fixes

1.1

  • Added support for PHP 7.2
  • Removed support for PHP < 5.6
  • Added plugin activation compatibility checks

1.0

  • Initial release