メールを自動的に処理するために、メールを php スクリプトにパイプしようとしています。
PHPスクリプトから送信された電子メールを受信したため、パイプが機能していることはわかっていますが、次のようなエラーメッセージも受信します。
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
pipe to |/usr/local/bin/php -q /home/myUserName/domains/myDomain.nl/public_html/api/pipe.php
generated by forwarder@myDomain.nl
この問題の原因は何か考えている人はいますか?
特にパイピングが機能している場合、メッセージの送信者にエラーメッセージが返されることを明らかに望んでいないためです。
編集:
これはあなたも知りたい情報かもしれません...
私のウェブホストは DirectAdmin を使用しています。
サーバーを自分で実行していないため、構成ファイルを編集できません。
編集2:
php ファイル:
#!/usr/local/bin/php -q
<?php
// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while(!feof($fd))
{
$email .= fread($fd, 1024);
}
fclose($fd);
mail('my@email.nl', 'From my email pipe!', $email);
?>