Skip to content

Instantly share code, notes, and snippets.

@Rarst
Created March 31, 2019 07:51
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
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