PHP管道程序

时间:2017-01-01 14:50:30

标签: php pipe cpanel

我正在尝试通过服务器上子域上的电子邮件设置PIPE连接。我不能为我的生活找到错误,出于安全原因,我已经删除了几个信息,但我已经放置了我认为可以获得的所有信息。

Return-path: <>
Envelope-to: ** REDACTED **
Delivery-date: Sun, 01 Jan 2017 08:39:00 -0600
Received: from mailnull by **REDACTED** with local (Exim 4.87)
id 1cNhHo-00052H-2p for **REDACTED**; Sun, 01 Jan 2017 08:39:00 -0600
X-Failed-Recipients: **EMAIL ADDRESS UTILIZED**
Auto-Submitted: auto-replied
From: Mail Delivery System <Mailer-Daemon@myf.myfallen.net>
To: **REDACTED**
Content-Type: multipart/report; report-type=delivery-status; boundary=1483281540-eximdsn-172165259
MIME-Version: 1.0
Subject: Mail delivery failed: returning message to sender
Message-Id: <E1cNhHo-00052H-2p@myf.myfallen.net>
Date: Sun, 01 Jan 2017 08:39:00 -0600
X-EsetId: 37303A29489795666C7762

cPanel管道发送电子邮件:

  

电子邮件 | / home / USER /public_html/staff/core/emailTicket.php

代码:

#!/usr/local/lib/php  -q
<?php
require('error.php');
require('connection.php');
require('email/bannedemail.php');    
require('email/newEmailTicket.php');  
$fd = fopen("php://stdin", "r");
$email_content = "";
while (!feof($fd)) {
    $email_content .= fread($fd, 1024);
}
fclose($fh);

$lines = explode("\n", $email_content);

$from = "";
$subject = "";
$headers = "";
$message = "";
$is_header = true;

//loop through each line
for ($i=0; $i < count($lines); $i++) {
    if ($is_header) {
        // hear information. instead of main message body, all other information are here.
        $headers .= $lines[$i]."\n";

        // Split out the subject portion
        if (preg_match("/^Subject: (.*)/", $lines[$i], $matches)) {
            $subject = $matches[1];
        }
        //Split out the sender information portion
        if (preg_match("/^From: (.*)/", $lines[$i], $matches)) {
            $from = $matches[1];
        }
    } else {
        // content/main message body information
        $message .= $lines[$i]."\n";
    }
    if (trim($lines[$i])=="") {
        // empty line, header section has ended
        $is_header = false;
    }
}

**我的代码低于**

PHP信息:

配置文件(php.ini)路径/ usr / local / lib 加载的配置文件/usr/local/lib/php.ini

我搜索了多个地方寻找答案,但仍找不到任何答案。

电子邮件错误:

  

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

     

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

     

管道到| / home / USERNAME /public_html/staff/core/emailTicket.php   由 EMAIL 生成   本地交付失败

0 个答案:

没有答案