I get an email notifying me of every new user registration on my site and now that it gets hundreds or thousands of new users a day, it's getting a little out of hand.

It seems like it'd be a Wordpress setting to disable it, but I can't seem to find anything. Do I really need a plugin to do this?


3 Answers 3


One plugin, among several: http://wordpress.org/extend/plugins/disable-new-user-email-notifications/

You can grab the function out of it and use it directy in functions.php


There are several ways to prevent user notification for new registered users and user password changes.

One would be to change the pluggable functions "wp_new_user_notification()" and "wp_password_change_notification()". A different way would be to post the following code in functions.php.

It uses the "phpmailer_init" hook to test, if the subject of the mail is the one sent by "wp_new_user_notification" and "wp_password_change_notification". If the condition is met then the $phpmailer object is newly initialized. That means it is empty and cannot be sent since phpmailer class checks if there is at least a single recipient.

// prevent admin notification email for new registered users or user password changes
function conditional_mail_stop() {
    global $phpmailer;
    $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    $subject = array(
        sprintf(__('[%s] New User Registration'), $blogname),
        sprintf(__('[%s] Password Lost/Changed'), $blogname)
    if ( in_array( $phpmailer->Subject, $subject ) )
        // empty $phpmailer class -> email cannot be send
        $phpmailer = new PHPMailer( true );
add_action( 'phpmailer_init', 'conditional_mail_stop' );

Please have a look in the following link .This might also be used to help

  • 1
    Hi - welcome to WPSE. We discourage link-only answers here, sorry: could you please copy the relevant bits into the answer? Thanks!
    – Rup
    Jan 7, 2020 at 13:08
  • I was going to say I'm not keen on the approach - you're deliberately breaking phpmailer which I guess would make $phpmailer->send() throw an exception rather than stopping the email in a cleaner way? - but I see this is just a copy/paste of the code from the other answer anyway.
    – Rup
    Jan 7, 2020 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.