Disable new blog welcome email (6 posts)

  1. moose1
    Posted 5 years ago #

    I am migrating a bunch of old WPMu sites to a new 3.0 network install.

    I want to create the new sites without sending out the welcome email that contains the new blog address and login info because the sites are not ready yet and it will just confuse people.

    Is there a way to do this?


  2. David Gard
    Posted 5 years ago #

    Under 'Super Admin -> Users', look for this option (it's a checkbox) -

    Registration notification - Send the network admin an email notification every time someone registers a site or user account.

  3. moose1
    Posted 5 years ago #

    Hi duck_boy,

    I believe that just disables the email that goes to the main WP install admin (me in this case), as opposed to the specific site administrator assigned to a particular sub-site. Is that correct?

  4. David Gard
    Posted 5 years ago #

    Yes it does, thought that is what you were after - sorry, mis-read your post.

  5. moose1
    Posted 5 years ago #

    This works. In functions.php, add this function:

    add_filter('wp_mail', 'disable_email_filter');
    function disable_email_filter($result = '') {
    	$to = '';
    	$subject = '';
    	$message = '';
    	$headers = '';
    	$attachments = array ();
    	return compact('to', 'subject', 'message', 'headers', 'attachments');
  6. Daniel Bachhuber
    Hand Built
    Posted 5 years ago #

    If you want to make this a permanent feature without disabling email notifications altogether, here's how you might do it:

    function db_remove_new_site_notification_email( $blog_id, $user_id, $password, $title, $meta ) {
    return false;
    add_filter( 'wpmu_welcome_notification', 'db_remove_new_site_notification_email' );

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.