9 lines
421 B
PHP
9 lines
421 B
PHP
<?php
|
|
/*
|
|
* A sendmail for the tests: PHP's mail() runs it through sendmail_path.
|
|
* It appends the message to the file in MAIL_LOG, one JSON line each.
|
|
*/
|
|
$message = stream_get_contents(STDIN);
|
|
file_put_contents(getenv('MAIL_LOG'), json_encode(array('args' => array_slice($argv, 1), 'message' => $message),
|
|
JSON_INVALID_UTF8_SUBSTITUTE) . "\n", FILE_APPEND | LOCK_EX);
|