Skip to content

Instantly share code, notes, and snippets.

@Rarst
Created March 31, 2019 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Rarst/c217ad43edd368c0b116b274c529eb2a to your computer and use it in GitHub Desktop.
Save Rarst/c217ad43edd368c0b116b274c529eb2a to your computer and use it in GitHub Desktop.
A simple mu–plugin snippet for overriding and logging WP emails in development.
<?php
class R_Mailer {
function Send() {
error_log( wp_debug_backtrace_summary() );
}
}
add_action( 'phpmailer_init', function( &$mailer ) {
$mailer = new R_Mailer();
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment