Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    3

    Post Sending email to a Script using CPanel

    Greetings to all of you, men !!

    I have seen that you know something about this.

    Look, I want to redirect all the mail that anyone send to myemail@mydomain.com to a PHP Script.

    In the DESTINATION field (in CPANEL9 --> E-mail Filtering), I have tried all of this and a lot more:
    |/home/mbcomp/display.php
    /home/mbcomp/public_html/display.php
    Where "mbcomp" is my user name.

    I have my Script in: /public_html/display.php

    The code in the file display.php is this:

    PHP Code:
    PHP Code:
    #!/usr/bin/php -q
    <?php
    mail
    ("mymail@mydomain.com","IT'S DONE, WOW!!","YES, THIS TEST IS WORKING");
    ?>
    That, in order to get an email to my personal address just for a TEST. If I go directly to http://www.mydomain.com/display.php it works, cos I receive that email.

    But I have not received any mail with the subject "IT'S DONE, WOW" when I send an email to mymail@mydomain.com.

    I only have received mails that say "MAIL DELIVERY FAIL" in the subject.

    I wonder if you could mind helping me with any advise you can. Anything will help. It's very important to me.

    Thank you, man !!

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    30

    Default

    Quote Originally Posted by uamistad
    In the DESTINATION field (in CPANEL9 --> E-mail Filtering)...
    You should be in: Forwarders NOT E-mail Filtering


    1.) Click Forwarders
    2.) Click Add Forwarder "Link"
    3.) Enter e-mail alias in first field
    4.) Select domain or sub domain in second field
    5.) Enter |/home/mbcomp/public_html/display.php in third field
    6.) Click Add Forwarder "Button"
    7.) Do your test again!

    Hope this helped?

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    3

    Default I can't do it

    Hi !!

    I followed your steps, but I already receive just the "Error message", I mean, the PHP Script is not running yet.

    Could you tell me what's your Hosting name, please?

    Maybe is my hosting. It could be find to try another.

Similar Threads & Tags
Similar threads

  1. PHP script not sending email when called throught a cron with lynx
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 04-08-2011, 06:20 PM
  2. dont send email cPanel. other application sending
    By Tymsah in forum E-mail Discussions
    Replies: 1
    Last Post: 03-04-2008, 02:07 PM
  3. Email Filtering - Sending mail to a PHP script.
    By uamistad in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-26-2005, 02:40 AM
  4. Modernbill installed on cPanel is sending out FORGED EMAIL?
    By sexy_guy in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 04-17-2003, 10:23 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube