Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member Tyler.S's Avatar
    Join Date
    Sep 2010
    Location
    Ontario Canada
    Posts
    14

    Default Creation/Setup of Email Default in postwwwacct

    I was wondering if this was possible at all using the xmlapi? I have done some goolge searching as well as here on the forums but I have had no luck. I have created a script to create a DB, DB User, Create Tables in the DB and input information into the DB and now I need to be able to set the default email address to pipe to a program in postwwwacct.

    Any help would be great.

  2. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default

    You should look at the API2 call Email::addforward. I will let you set a 'pipe to' program.

    Since you're using the xmlapi PHP client class, you should be able to do something like this within your existing script:

    Code:
    // all email send to lildave@dave.com will be piped to my_email_program.sh
    $args = array(
    	'domain'    => 'dave.com',
    	'email'    => 'lildave',
    	'fwdopt'    => 'pipe',
    	'pipefwd'    => '/usr/bin/my_email_program.sh',
    );
    
    $xmlapi->api2_query($user, 'Email', 'addforward', $args);
    Regards,
    -David
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

Similar Threads & Tags
Similar threads

  1. Auto-Creation Of MySQL DB with postwwwacct
    By Tyler.S in forum cPanel Developers
    Replies: 21
    Last Post: 05-03-2011, 06:27 AM
  2. Auto Setup Default Email Address with postwwwacct
    By musosmiffy in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-09-2011, 09:15 AM
  3. Issues With Automatic MySQL creation re. postwwwacct
    By TopNotchContet in forum cPanel Developers
    Replies: 2
    Last Post: 01-19-2011, 05:25 PM
  4. Postwwwacct script: automate on account creation
    By cPanelDavidN in forum cPanel Developers
    Replies: 0
    Last Post: 05-29-2010, 07:03 PM
  5. Default email generated on account creation
    By stevenyhof in forum New User Questions
    Replies: 1
    Last Post: 02-21-2010, 06:13 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube