您好,我正在尝试将收到的电子邮件传送到 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 |/home2/mimjobco/public_html/pipe.php
我从 cpanel 中选择了 pipe.php 地址,所以它不会错 这是图片!
这是我的 pipe.php 代码:
#!/usr/bin/php –q
<?php
require_once('class/support.php');
require_once('class/db.php');
$title = 'email_request';
$text = 'email_req_text';
$sup_id = 1 ;
$sup = new support;
$sup->title = $title;
$sup->part_id = $sup_id ;
$sup->text = $text;
$sup->email = 'email';
$sup->type = 1;
$sup->set_ticket();
mail('xxxx@gmail.com','new message recived','new message recived ');
我也将它的权限设置为 755
我错过了什么吗? 还有什么我应该做的吗?有人提到过老太婆的工作?!
最佳答案
错误消息显示“/home2/mimjobco/pipe.php”,但屏幕截图显示该文件位于您的“public_html”目录中(大概是“/home2/mimjobco/public_html/pipe.php”)。
请注意,“pipe.php”应该只在“public_html”中,如果您希望它可以在网站上访问。否则,它应该位于您的主目录层次结构中的其他位置(例如 ~/bin/)。
关于php - 管道邮件到 PHP 脚本 : cant find the pip. php 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8580027/