<?php

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

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

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

	return $mail;
}
//add_filter( 'wp_mail', 'bbg_mail_to_debug_log', 100000000 );
