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.

postwwwacct issue

Discussion in 'General Discussion' started by pacificw, Jul 18, 2008.

  1. pacificw

    pacificw Well-Known Member

    Joined:
    Aug 26, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    I've searched many of the cpanel docs (api) and the createaccount page as well, but I'm unable to get the postwwwacct to work correctly and spit out a proper email back to the client.

    Below is the output after a new acct has been setup:
    Here is what I have for the postwwwacct:
    Here is what I have listed from reading the cpanel docs:
    Granted this is just a bit of the list... I'm just wondering if someone has a completed list that is correct they can post or send to me in PM. I would very much appreciate it. I've setup many test accounts going through it and even trying change them by what my out put was, and they still don't come out correctly. I'm really baffled and scratching a bald spot on my head.

    Thank!

    Terra
     
  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
    Keep in mind postwwwacct should be a shell script, not merely what you want in an email.
     
  3. pacificw

    pacificw Well-Known Member

    Joined:
    Aug 26, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Yes, I have it running as a shell script.

    Anything that might be helpful? It's a bit frustrating since cpanel is providing documents but the documents are incorrect.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    When using /scripts/postwwwacct, the values are passed as a hash table. This means you shouldn't access them like

    Code:
    $ARGV[5]
    
    but rather as

    Code:
    $ARGV{'user'}
    
    If you want to use the array based version then use the legacypostwwwacct script.
     
  5. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Looks to me a bit like you are looking at the old API documentation.

    The new API passes parameter name and value pairs on the command line, and you need to parse it before you can use it.

    In a shell script, that looks like:

    Code:
        while [ $# != 0 ]
        do
            eval export cp_$1='"$2"'
            shift 2
        done
    
    Then you have variables like cp_user etc all set and ready to go.

    Or you can use legacypostwwwacct (I think, named something like that).
     
  6. pacificw

    pacificw Well-Known Member

    Joined:
    Aug 26, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Sorry for taking so long to reply but I've been quite busy past few weeks. Okay, so I can't use it the way I was going too.. I see that now. The documentation I was looking at is the latest one posted on the cpanel website. I'll try to change it around and use the other information instead of number show the actual name. I've looked around is there a place to grab a copy of the legacypostwww-script? I simply cannot find it.

    Thanks

    Terra

    **side note: I tried changing from numbers to data ie: $ARGV[0] to $ARGV[domain] and that didn't work either.. so does anyone have a working postwwwacct script that I can have to use please. :begging icon:
    Thank you..
     
    #6 pacificw, Jul 30, 2008
    Last edited: Jul 30, 2008
  7. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Terra,

    How to do this is actually described in the documentation, or was when I last looked. Whether in Perl or shell, you have to populate the array names, it's not automatic; there's 2 lines of code you need to put in there. I posted a code fragment that would make the variables work in a shell script above; please re-read it.

    The legacy file is an alternate script that you create, again described (briefly) in the documentation or in Google! There is no existing file to find.
     
  8. pacificw

    pacificw Well-Known Member

    Joined:
    Aug 26, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    TY Brianoz.... I guess you can say I'm a bit 'tupid' when it comes to figuring out API's. I've never really had to use one yet and I have lots on my plate right now to sit down and read on how to use one. The only thing I wish Cpanel had that DirectAdmin has is a welcome email to the user when they have their account created. I don't know why it can't be added into the features. So, instead I'm just going to fork out the extra money and get a hosting billing system. The ones I've looked at ALL have a welcome letter that describes what the user ordered and the login information that they will need to get into their account.

    I'd still like to learn how eventually but as I said, I just don't have time right now. If you or anyone has the code already put together for something simple, it would sure be nice if it could be shared. :eek:

    Thanks again for the prior help.

    Terra
     
  9. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Ah ... sure, now I see what you're trying to do.

    For various reasons cPanel is basically designed to go with a billing package. The one you want these days is definitely WHMCS - www.whmcs.com. Robust, affordable, powerful, and easy to use - been using it now for 18 months and haven't looked back. Over that time it's become the number one billing package for new hosts and I think has basically pushed ModernBill out of market domination (a good thing, MB was nasty).

    Even with WHMCS you should do some work on the basic Welcome email to make it more friendly, but it's a much better start!
     
  10. MaraBlue

    MaraBlue Well-Known Member

    Joined:
    May 3, 2005
    Messages:
    335
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Carmichael, CA
    cPanel Access Level:
    Root Administrator
    Brian beat me to it, but as I read the thread I was going to (also) suggest using WHMCS. The stock emails need some customizing, but it's very easy to do. The cost is only $13.95 per month (less, I think, if your server company offers it or you get it from a reseller). Well worth the money.
     
Loading...

Share This Page