norcross/airplane-mode — pull request #7 by leewillis77 (2014-06-23 21:53:38+00:00)
Title: Do not send emails while in airplane mode

As per the subject. This utilises the MockMailer class from https://core.trac.wordpress.org/browser/trunk/tests/phpunit/includes/ to override the global $phpmailer object to prevent emails being sent.

The caveat being that if something (broken plugin?) overrides $phpmailer, then WordPress will recreate a normal PHPMailer object. Probably needs a core change to fix that - see https://core.trac.wordpress.org/ticket/28618