The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Incoming mail & php

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

  1. Tagor

    Tagor Well-Known Member

    Joined:
    Mar 6, 2004
    Messages:
    193
    Likes Received:
    0
    Trophy Points:
    16
    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:
    451
    Likes Received:
    2
    Trophy Points:
    18
    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.
     
  3. shashank

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
  4. Tagor

    Tagor Well-Known Member

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

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    no probs :D
     
Loading...

Share This Page