site/signup/_probe.php

10 lines
475 B
PHP
Raw Normal View History

2025-09-29 20:11:26 +00:00
<?php
$cmd='/usr/bin/sendmail.postfix -t -i -f signup@tilde.club';
$ds=[0=>['pipe','r'],1=>['pipe','w'],2=>['pipe','w']];
$p=proc_open($cmd,$ds,$pipes);
fwrite($pipes[0],"To: root@tilde.club\r\nSubject: proc_open test\r\n\r\nhi\r\n"); fclose($pipes[0]);
$stdout=stream_get_contents($pipes[1]); fclose($pipes[1]);
$stderr=stream_get_contents($pipes[2]); fclose($pipes[2]);
$rc=proc_close($p);
var_dump(['rc'=>$rc,'stderr'=>$stderr,'sendmail_path'=>ini_get('sendmail_path')]);