Big list of every transactional email sent by a WordPress website, and how to stop the ones you don’t want.
{SITENAME}
] Notice of Password Change{SITENAME}
] Admin Email Changed{SITENAME}
] Network Admin Email Changed{SITENAME}
] Password Changed{SITENAME}
] Email Changed{SITENAME}
] Password Changed{SITENAME}
] New User Registration{SITENAME}
] Login Details{SITENAME}
] Your site has updated to WordPress %2$s{SITENAME}
] WordPress %2$s is available. Please update!{SITENAME}
] URGENT: Your site may be down due to a failed update{SITENAME}
] Some plugins and themes have automatically updated{SITENAME}
] Some plugins were automatically updated{SITENAME}
] Some themes were automatically updated{SITENAME}
] Some plugins and themes have failed to update{SITENAME}
] Some plugins have failed to update{SITENAME}
] Some themes have failed to update{SITENAME}
] Background Update Failed{SITENAME}
] Background Update Finished{NETWORK TITLE}
Site: {SITENAME}
{NETWORK TITLE}
User: {USERNAME}
{NETWORK TITLE}
] Network Admin Email Changed’{SITENAME}
] Personal Data Export{SITENAME}
] Confirm Action: Export Personal Data{SITENAME}
] Confirm Action: Erase Personal Data{SITENAME}
] Action Confirmed: Export Personal Data{SITENAME}
] Action Confirmed: Erase Personal Data{SITENAME}
] Trackback: “{POST TITLE}
“{SITENAME}
] Pingback: “{POST TITLE}
“{SITENAME}
] Comment: “{POST TITLE}
“You can use the following PHP function to stop WordPress from sending specific email notifications.
/**
* Filter Email Notifications
*
* @param bool|null $return short-circuit return value
* @param array $atts array of the `wp_mail()` arguments
*/
function pre_wp_mail( $return, $atts ) {
$subject = $atts['subject'];
$globs = [
'New Site Registration*',
'New User Registration*',
];
foreach ( $globs as $glob ) {
if ( fnmatch( $glob, $subject ) ) {
return false;
}
}
return $return;
}
add_filter( 'pre_wp_mail', 'pre_wp_mail', 99, 2 );
This approach can also be used to filter email in other ways:
Be cautious while doing this, adjusting emails is advanced and if you’re not careful it could negatively affect core functionality that’s critical to your WordPress website.