-
-
Save DKepov/c85addcd76b2b40e49f032fce113b5ee to your computer and use it in GitHub Desktop.
To /usr/sbin/sendmail
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 | |
#!/usr/bin/php | |
<?php | |
//==================================================== | |
// Program : Fake send mail | |
// Author : pouletfou at gmail | |
// Description : save this file as /usr/sbin/sendmail | |
// and you can test your PHP applications using mail | |
// by looking at the /tmp/fakesendmail.log files. | |
//==================================================== | |
define('LOGFILE','/tmp/fakesendmail.log'); | |
$log = fopen (LOGFILE,'a+'); | |
fwrite($log,"\n".implode(' ',$argv). | |
" called on : ".date('Y-m-d H:i:s')."\n"); | |
fwrite($log,file_get_contents("php://stdin")); | |
fwrite($log, | |
"\n===========================================================\n"); | |
fclose($log); | |
?> | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment