views:

128

answers:

3

I am piping my php email to a php script it works fine and executes except it sends back a bounce email, do I have to return something or echo something or set some headers to stop this?

A: 

Can you share the code ?

DotNeyGuy
http://pastebin.com/d587031a5
Tony
A: 

DirectAdmin is a control panel, it sounds like the MDA (mail delivery agent) is determining that the message has failed.

Without knowing what the MDA is and how it is configured then its virtually impossible to advise how to fix this, however a coupkle of things to note:

1) the MDA may simply not be able to pipe output to a program - have you checked with your service provider?

2) you may have misconfigured the MDA forward - try replacing it with a simple 'cat >somefile'

3) the MDA may be looking for a valid return value from the pipe - by default, shell scripts shuold return a zero exit status if successful - a non-zero value if they fail

HTH

C.

symcbean
I have tried with return TRUE; return FALSE; exit(0); and die(0); at the end.
Tony
A: 

I fixed it, tested it in SSH and it was outputting a new line somewhere so I just put the entire script inside an output buffer. <3

Tony