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.

Creating email forwarders via url.

Discussion in 'E-mail Discussions' started by Krrose27, Jul 9, 2007.

  1. Krrose27

    Krrose27 Registered

    Joined:
    Jul 5, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I wrote the following code inside a php script to make email accounts without having to login to my cpanel. I am now trying to create something simmilar but for email forwarders.
    This is the code i use to create email accounts, note this is using php.
    http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?email=$euser&domain=$edomain&password=$epass&quota=$equota

    Does anyone have any idea on the equivalent for email forwarders?


    Thanks for the help.

    Also is their anyway else todo this.
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    There is an API2 call to add an email fowarder:

    http://www.cpanel.net/plugins/api2/Cpanel::Email::addforward.pod.html

    And you can call API2 tags from the XML API:

    http://www.cpanel.net/plugins/xmlapi/cpanel.html

    Put the two together and you have your solution on how to add a forwarder from outside a cPanel/WHM environment :).
     
Loading...

Share This Page