电子邮件转发问题-q无效

时间:2011-11-27 05:53:24

标签: php networking cpanel html-email email-forwarding

我需要做的是转发info@myhost.com以通过管道传输到驻留在我服务器中的php脚本..是home / myhost / autoprocess.php。我只是使用下面提到的代码来实现它。

#!/usr/bin/php -q
<?php

// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd))
{
    $email .= fread($fd, 1024);
}
fclose($fd);


mail('myemail@gmail.com','From my email pipe!','"' . $email . '"');

?>

我-q部分告诉管道不要将电子邮件退回给发件人。一切正常但管道仍然会将电子邮件退回给发件人。电子邮件就像这样说..

此邮件是由邮件传递软件自动创建的。

您发送的邮件无法发送给其中一个或多个邮件 收件人。这是一个永久性错误。以下地址失败:

管道到| /home/myHost/autoreply.php    由info @ myHost生成

在传递尝试期间生成了以下文本:

------管道到| /home/myHost/autoreply.php       由info@myHost.com生成------

/ usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/ usr / bin / php要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libexslt.so.0需要) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libexslt.so.0需要) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求) / usr / bin / php:/opt/xml2/lib/libxml2.so.2:没有可用的版本信息(/opt/xslt/lib/libxslt.so.1要求)

------这是邮件的副本,包括所有标题。 ------

没有问题只是我想停止发送给发件人的自动回复与上述错误。我不知道错误是因为它正确地管理到php脚本并且我收到了一封电子邮件myemail@gmail.com

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

如果出现任何类型的错误(甚至是警告),某些服务器会发送退回邮件我所做的是将error_reporting(0);放在我的代码的开头,问题就消失了

相关问题