douhuang75397 2017-10-30 13:59 采纳率: 0%
浏览 86
已采纳

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.

  • 写回答

1条回答

  • dongyishen5796 2017-10-30 14:39
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料