PHP电子邮件管道,本地传递错误

The problem is that I get the "local delivery failed" email back to the address I am sending email to. I have a forward set to an email with a link to .php file like this:

"|/home/admin/domains/test.dev/public_html/pipe.php"

Now the file itself has this following code:

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

$to      = 'test@test.dev';
$subject = 'test';
$headers = 'From: test@localhost.dev' . "
";

mail($to, $subject, 'test pipe', $headers);

What should I fix? Path to the file seems good and it has 777 permissions.

展开翻译

译文

问题是我收到“本地传递失败”的电子邮件回到我发送电子邮件的地址。 我有一个转发设置到一个电子邮件,其中包含.php文件的链接,如下所示:</ p>

 “| /home/admin/domains/test.dev/public_html/pipe.php  “
</ code> </ pre>

现在文件本身有以下代码:</ p>

 #!/ usr / local / lib /  php -q 
&lt;?php

$ to ='test@test.dev';
$ subject ='test';
$ headers ='From:test@localhost.dev'。 “
”;

mail($ to,$ subject,'test pipe',$ headers);
</ code> </ pre>

我应该修复什么? 该文件的路径似乎很好,它有777权限。</ p>
</ div>

1个回答

The problem was a wrong php library folder. Contacted my hosting provider and changed the link to:

#!/usr/local/bin/php53

now it's working.

展开翻译

译文



问题是错误的php库文件夹。 联系我的托管服务提供商并将链接更改为:</ p>

 #!/ usr / local / bin / php53 
</ code> </ pre>

现在它正在运作。</ p>
</ div>

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问