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!

Add a forward with PHP

Discussion in 'E-mail Discussion' started by SuperGlue, Sep 17, 2014.

  1. SuperGlue

    SuperGlue Member

    Joined:
    Sep 17, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hy,
    my host use the cpanel and I have to add automatically a new forwarding with php but I dont know how to ...
    Can u help me ?

    Thanks :D

    (I'm French, sorry for possibles errors...)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can forward emails using the "Forwarders" option in cPanel. Is there some other method you prefer to use?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SuperGlue

    SuperGlue Member

    Joined:
    Sep 17, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello :D
    I have to redirect automatically with a php script :/
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you clarify why you need to redirect email this way? For instance, what's a specific example of how you need to forward emails?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. SuperGlue

    SuperGlue Member

    Joined:
    Sep 17, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,
    In fact, I have to create a little mail service. On my website, the user enter his real mail adress and i give him a "trash mail". But i can't redirrect automatically with Php :(
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm not sure I understand this scenario. Have you considered using the "Forwarder" option in cPanel?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. SuperGlue

    SuperGlue Member

    Joined:
    Sep 17, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,
    If I use the "forwarder" option, I have to make that for each client... I would to create a php script to automate this action...
    Thank's
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. SuperGlue

    SuperGlue Member

    Joined:
    Sep 17, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Thanks, but i'm a novice and i dont understand how to use the API :(
    I've seen that i have to use this code :
    But where i have to write this code ?
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    It's highly likely that you will need to consult with a developer to write this code for you if you are not comfortable using our API. It involves developing a custom PHP script, of which this page might help:

    https://github.com/CpanelInc/xmlapi-php

    It's not something we will be able to complete for you.

    Thank you.
     
    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