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!

Incoming mail & php

Discussion in 'E-mail Discussion' started by Tagor, Sep 17, 2005.

  1. Tagor

    Tagor Well-Known Member

    Joined:
    Mar 6, 2004
    Messages:
    193
    Likes Received:
    0
    Trophy Points:
    166
    How can I forward a e-mail message to a php script?

    I tried this:

    |/home/user/public_html/script.php
    |/public_html/script.php
    |public_html/script.php

    They all don't work. I get a bounce which says:
    OR
     
  2. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    456
    Likes Received:
    3
    Trophy Points:
    318
    Location:
    Vancouver, Canada
    Exim gives a bounced error back whenever the PHP script outputs anything. I have a working pipe to a PHP script as follows:
    Code:
    |/usr/bin/php -q /home/user/public_html/script.php >/dev/null 2>&1
    Because the pipe calls /usr/bin/php, the script itself should then not start with a #!/usr/bin/php line, and does not have to be executable.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. shashank

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Tagor

    Tagor Well-Known Member

    Joined:
    Mar 6, 2004
    Messages:
    193
    Likes Received:
    0
    Trophy Points:
    166
    Thanks guys :)
     
  5. shashank

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    no probs :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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