Skip to content

Instantly share code, notes, and snippets.



Last active May 16, 2016
What would you like to do?
PHPMAILER for dev server
$input = file_get_contents('php://stdin');
preg_match('|^To: (.*)|', $input, $matches);
$filename = tempnam('/var/log/mail', $matches[1] . '.');
file_put_contents($filename, $input);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.