Stop a WordPress website from sending any emails using the standard wp_mail() function. No emails will be sent, not even for password resets or administrator notifications.
WordPress websites can send emails for a variety of reasons — e.g user registration, password reset, enquiry form submission, e-commerce purchase — but sometimes you don’t want it to send anything at all. Some reasons for disabling all emails:
- demonstration websites that allow users to do things that normally send emails
- development / test websites with live data that might email real customers
- bulk-loading data into websites which might trigger emails
- adding new sites into multisite installations
Many thanks to the generous efforts of our translators:
- Chinese (zh-CN) — Cai_Miao
- Czech (cs-CZ) — Rudolf Klusal
- Dutch (nl_NL) — the Dutch translation team
- English (en_CA) — the English (Canadian) translation team
- Korean (ko_KR) — the Korean translation team
- Russian (ru_RU) — the Russian translation team
- Japanese (ja) — Cai_Miao and the Japanese translation team
- German (de-DE) — Peter Harlacher
- Norwegian: Bokmål (nb-NO) — neonnero
- Norwegian: Nynorsk (nn-NO) — neonnero
If you’d like to help out by translating this plugin, please sign up for an account and dig in.
- Either install automatically through the WordPress admin, or download the .zip file, unzip to a folder, and upload the folder to your /wp-content/plugins/ directory. Read Installing Plugins in the WordPress Codex for details.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Why am I still getting standard WordPress emails?
You probably have another plugin that adds its own implementation of the
wp_mail()function. Try disabling some plugins.
- Standard WordPress emails have stopped, but some others still get sent
You probably have a plugin that is sending emails via some other method, like directly using the PHP
mail()function, or directly implementing an SMTP client. Not much I can do about that…
- How does it work?
The plugin replaces the standard WordPress
wp_mail()function with a function that sends no emails. Nada. Zip. Silence.
Behind the scenes, it creates a private copy of PHPMailer and allows the system to interact with it, but silently suppresses the functions that send emails. The standard WordPress filter and action hooks are supported, so plugins that register hooks for those will still function as normal. It just doesn’t actually send any emails.
Good lord I want email to die. Very old tech. So nice we can turn it off and use other things. Thanks!
Installed and it works right away.
I’ve just dropped by to say a big thank you for providing and maintaining it for free!
I don’t understand how this is not part of WP core… Disabling emails sent to users is absolutely necessary when working with live user data on dev/staging environments.
After much frustration with users receiving emails after creating new users with a .csv file upload plugin, I learned that WP seems to generate these emails automatically – not the plugin itself – with no obvious way to disable this feature [bug]. This plugin seems to have resolved that issue. Kudos to these guys for a simple fix.
Contributors & Developers
“Disable Emails” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
The full changelog can be found on GitHub. Recent entries:
- added: setting to force BuddyPress to use
wp_mail()so that its emails can be disabled