Project

General

Profile

Bug #5127 » bbg-mail-debug.php

Boone Gorges, 2016-01-15 05:13 PM

 
1
<?php
2

    
3
function bbg_mail_to_debug_log( $mail ) {
4
	$log_file = WP_CONTENT_DIR . '/mail.log';
5

    
6
	$message = "\nTO: {$mail['to']} \nSUBJECT: {$mail['subject']}\nMESSAGE: {$mail['message']}\n\n";
7

    
8
	error_log( '[' . date( 'Y-m-d H:i:s' ) . '] ' . $message, 3, $log_file );
9

    
10
	return $mail;
11
}
12
//add_filter( 'wp_mail', 'bbg_mail_to_debug_log', 100000000 );
(2-2/2)