简体   繁体   English

电子邮件管道不适用于PHP脚本。 本地传递失败错误

[英]Email piping not working for PHP script. Local delivery failed error

In cPanel I have piped the following to my script: 在cPanel中,我将以下内容通过管道传递到了脚本中:

alerts@XXX.com  to  |/home/XXX/public_html/client/inc/msg/mailReader.php

I get the following email returned: 我收到以下电子邮件退回:

This message was created automatically by mail delivery software. 该消息是由邮件传递软件自动创建的。

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 |/home/XXX/public_html/client/inc/msg/mailReader.php generated by alerts@XXX.com local delivery failed 由Alerts@XXX.com本地传送到| /home/XXX/public_html/client/inc/msg/mailReader.php的管道失败

The path to mailReader.php is definitely correct, as well as the path to PHP in the shebang in mailReader.php. mailReader.php的路径绝对正确,而mailReader.php中的shebang中的PHP路径也正确。 Line 1 is: 第1行是:

#!/usr/local/lib/php -q<?php

Do you have any idea why it would return the "local delivery failed" error? 您是否知道为什么它将返回“本地传递失败”错误?

The directory was actually #!/usr/bin/php -q. 该目录实际上是#!/ usr / bin / php -q。 I have 2 other directories that have the files for PHP but this isn't looking for the PHP directory, its looking for the compiled PHP file in bin called "php". 我还有另外两个目录,其中包含适用于PHP的文件,但这不是要查找PHP目录,而是要在bin中搜索称为“ php”的已编译PHP文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM