cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Problems piping email to script

Hi All,

 

Hopefully someone can provide some advice on the problem I'm having. I've setup a forwarder to a php script and I just can't seem to get it to work.

 

So far I have scripts@my.domain | | /home/mydomain/myscripts/processemail.php

 

Now if I send an email from scripts@my.domain to scripts@my.domain I get the following error message:

 

This message was created automatically by mail delivery software.

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 |/home/mydomain/myscripts/processemail.php
    generated by scripts@my.domain
    local delivery failed

The following text was generated during the delivery attempt:

------ pipe to |/home/mydomain/myscripts/processemail.php
       generated by scripts@my.domain ------

Status: 404 Not Found
X-Powered-By: PHP/7.1.28
Content-type: text/html; charset=UTF-8

No input file specified.

processemail.php looks like this and has the permissions 755

#!/usr/bin/php 
<?php
mail('steve@myother.domain', 'Email Parser Test', 'THIS IS A TEST');
?>

if I send an email to scripts@my.domain from any other email address the email just disappears into a black hole.

 

Does anyone have any ideas what I'm doing wrong?

 

Thanks,
Steve.

 

 

 

 

2 REPLIES 2
Super User I
Super User I

Re: Problems piping email to script

Hello and thank you for reaching out to the community.

Is there a application that is requiring you to forward email that way?

There is a Forwarders selection under Email to forward emails in cPanel.

Very Respectfully,

Drew Davis
Navy Veteran and Entrepreneur | GoDaddy Pro user | "Proud to be serving others!"

*** Please note that I offer free advice on this forum. Please feel free to give me KUDOS on this topic/discussion; mark my comment as ACCEPTED SOLUTION if you believe I've helped solved your issue. Thanks! ***

Re: Problems piping email to script

Hi Drew,

 

Yeah a client has looked into creating a script that will accept email responses and then database the the replies to the email.

 

I've already looked into the cpanel documentation for this and have set up the "advanced" forwarding but can't get the script to take the input from the piped email. Just keeps giving me the error the original post.

 

Thanks,

Steve.