Last active
May 16, 2016 11:45
-
-
Save f3l1x/d6f02fc3b498e33059e8876a73e9ae13 to your computer and use it in GitHub Desktop.
PHPMAILER for dev server
This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
$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