Preventing WordPress from Sending emails

Well, I was looking for a way to create new sites for existing users without sending out notification emails. I did manage to find one solution, but it's fairly drastic and should be used sparingly (and probably when you have scheduled maintenance if you have an active site). If you add the following code to wp-config.php, it will stop WordPress from sending outgoing emails (n.b., this means all outgoing emails):

// Disable Outgoing WordPress Emails
function wp_mail()
{
    //
}

Remember to remove this code when you are finished with your back-end work.

Like I said, this is a drastic solution, as it will stop your WordPress install from sending any outgoing email (e.g., password reminders), but it is useful if you have to do something in the back end that would generate hundreds or thousands of emails and you'd rather not spam your users (e.g., I used it to add a thousand sites to one of my installs without sending notifications to each of the thousand users involved).