PHPで空メール 実装メモ
#!/usr/bin/php -q
<?php
$source = file_get_contents("php://stdin");
if(!$source){
exit(0);
}
ereg('From: .+@[0-9a-zA-Z_\.\-]+',$source,$fromlist);
ereg('[0-9a-zA-Z_\.\-]+@[0-9a-zA-Z_\.\-]+',$fromlist[0],$from);
$to = $from[0];
#!/usr/bin/php -q
<?php
$source = file_get_contents("php://stdin");
if(!$source){
exit(0);
}
ereg('From: .+@[0-9a-zA-Z_\.\-]+',$source,$fromlist);
ereg('[0-9a-zA-Z_\.\-]+@[0-9a-zA-Z_\.\-]+',$fromlist[0],$from);
$to = $from[0];