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.

Auto account create question

Discussion in 'General Discussion' started by mrcgiguy, Mar 19, 2004.

  1. mrcgiguy

    mrcgiguy Registered

    Joined:
    Mar 18, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I'm developing an automatic account creation script so that I can offer instant access to accounts for my clients. It's basically done, and works just fine, but I couldn't find any reference anywhere as to how to get the clients email address into the account.

    I'm using the same string for creating accounts as found in the example script distributed through WHM:

    $response = $whm->createacct("$domain_name","$user_name","$pass_word","$package");

    This works fine, but leaves out the email field. I tried just adding it on at the end figuring it was perhaps optional:
    $response = $whm->createacct("$domain_name","$user_name","$pass_word","$package","$email_address");

    Unfortunately this does not have any effect. Anyone have any ideas?
     
  2. artisanpath

    artisanpath Registered

    Joined:
    Apr 22, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Antonio, TX
    Same Problem

    I'm haveing the same problem. I suppose I could just dig into my save email folders and get their email address out of there each time, but I'd really like to have it properly listed in the database.

    My script is php, but I have the same problem.

    I hate to leave a completely unhelpful comment, but I needed to so that I'll recieve a notification email lif someone answers you.
     
  3. Hughra Hosting

    Joined:
    Jan 12, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    post ur whole script, lemme see if i can find whats wrong
     
  4. mrcgiguy

    mrcgiguy Registered

    Joined:
    Mar 18, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    there isn't any problem with my script, it works perfectly. i already posted the only line in the script that really matters. i'd rather not post the entire script so that other people could just steal it.

    artisanpath: i've tried everything i could think of. i think the createacct function is the same in php & perl, so if you come up with a solution, please post it.
     
  5. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    In /scripts/wwwacct which creates new accounts in WHM there is reference to these:
    $contactemail
    $ceml
    $rpemail
    $owemail

    I don't know if they are of any use to you. Looking through wwwacct with your expert programming eyes might point you to the right one. HTH
    Just ignore if I am on the wrong track.
     
  6. ChadK

    ChadK Registered

    Joined:
    Aug 31, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
  7. whmapi.scripts

    whmapi.scripts Well-Known Member

    Joined:
    Sep 1, 2004
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    United Kingdom
    This can be done because we use it on our WHM API using a function called whm_addacc(). You need to post a variable called "contactemail" to /scripts/wwwacct to add a contact e-mail ;)
     
    #7 whmapi.scripts, Sep 2, 2004
    Last edited: Sep 2, 2004
  8. Digisource

    Digisource Member

    Joined:
    Oct 12, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page