Last active
May 17, 2017 07:26
-
-
Save jbrunemann/56e423b3228d3c2b1515fadb3d4c4a20 to your computer and use it in GitHub Desktop.
wp_mail to console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wp_mail($to, $subject, $message) { | |
$stdout = fopen('php://stdout', 'w'); | |
$output = str_repeat('-', 70)."\n\033[94mTO\e[0m: \033[96m{$to}\e[0m\n\033[94mSUBJECT\e[0m: \033[96m{$subject}\e[0m\n{$message}\n".str_repeat('-', 70)."\n"; | |
fwrite($stdout, $output); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment