Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Pipe email message to a php script. Script redirect message to diff addy?

Discussion in 'cPanel Developers' started by doni49, Oct 12, 2010.

  1. doni49

    doni49 Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    156
    I need to pipe email messages to a PHP script. The php script needs to insert a custom header in to the message and then forward the message on to a diff address.

    I think I can handle the part of inserting the header. But once I've done that, how can I redirect the message? I want it to still show as having come from the original sender. It should look the same as if I had created an actual forwarder within cPanel.

    TIA!
     
  2. doni49

    doni49 Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    156
    I just thought it might be helpful to give some more information as to what I'm trying to accomplish.

    I have a number of email forwarders that all forward to a couple of different email accounts (on the same server under my domain name). I need to have my script insert a header into the message that will provide some information that my email clients will look for. Then after the header is added, I want to forward the message on to it's final destination which is a different email address still on the same server and under my domain name.

    What I mean by redirect is to do what the "MailRedirect" extension in Thunderbird does. A message that has been Redirected shows NOTHING about having been forward--until you look at the headers. Such a message still shows as being addressed TO the same addresses and from the same address. When I look at the headers, it shows "forwarded by", "forwarded on" etc.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice