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.

Add a forward with PHP

Discussion in 'E-mail Discussions' 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:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  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:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    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.
     
  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:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I'm not sure I understand this scenario. Have you considered using the "Forwarder" option in cPanel?

    Thank you.
     
  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:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  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:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    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.
     
Loading...

Share This Page