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.

Confirm email not being sent

Discussion in 'E-mail Discussions' started by sebroberts, Dec 3, 2007.

  1. sebroberts

    sebroberts Registered

    Joined:
    Dec 3, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    When ever i create a hosting account, there is no conformation email sent to the new user who i have just created an account for, An email goes to the Admin account but not too the actual user.

    Any help please?
     
  2. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    hehehe - This thread happens alot. This is the way cPanel works. You can either get yourself some sort of billing/automation system that will send details to the client, or you can add the email to be sent in the script that cPanel calls when a new account is created.
     
  3. sebroberts

    sebroberts Registered

    Joined:
    Dec 3, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    What a n00b i must sound! - Thanks for your reply, I did do a search in the forums but could not find an answer :confused:

    Would you be able to help me out with
    ?

    Thanks once again,

    Seb.
     
  4. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    Not something I've ever had to do. But let me point you in the right direction.

    http://www.cpanel.net/support/docs/hooks.htm#postwww

    Create a file (if one doesn't exist already) /scripts/postwwwacct

    Code:
    #!/usr/bin/perl
    my %OPTS = @ARGV;
    my $user = $OPTS{'user'};
    my $domain = $OPTS{'domain'};
    
    $MailProgram = '/usr/sbin/sendmail';
    $Email = $OPTS{'contactemail'};
    
    $MailProgram .= ' -i' if $MailProgram =~ /sendmail/;
    open MAIL,"|$MailProgram";
    print MAIL <<TO_END;
    X-Script-Name: Post Account Creation Script
    X-Script-Location: $0
    Content-type: text/plain; charset="ISO-8859-1"
    To: $Email
    From: "Server Name" <server@domain.com>
    Subject: New Account Created
    Your new username is $OPTS{'user'} for the domain $OPTS{'domain'}
    
    Plan: $OPTS{'plan'}
    Quota: $OPTS{'quota'}
    Password: $OPTS{'pass'}
    Has CGI Access: $OPTS{'hascgi'}
    FrontPage Extensions: $OPTS{'installfp'}
    Shell Access: $OPTS{'hasshell'}
    Contact Email Address: $OPTS{'contactemail'}
    cPanel Theme: $OPTS{'cpmod'}
    Max FTP Accounts: $OPTS{'maxftp'}
    Max SQL Databases: $OPTS{'maxsql'}
    Max Pop Accounts: $OPTS{'maxpop'}
    Max Mailing Lists: $OPTS{'maxlst'}
    Max Sub-Domains: $OPTS{'maxsub'
    Max Parked-Domains: $OPTS{'maxpark'}
    Max Addon Domains: $OPTS{'maxaddon'}
    Bandwidth Limit: $OPTS{'bwlimit'}
    -----
    TO_END
    
    close MAIL;
    
    
    You may have to chmod +x the file before use.
    I've not written a perl script before, so I really have no idea if what I wrote works or not. I HAVE NOT TRIED THIS. Maybe a professional could double check my work :D
     
  5. sebroberts

    sebroberts Registered

    Joined:
    Dec 3, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for your help! ill have a look and see what i can do.

    I dont really understand how this works then, how would the user who has just purchased a hosting package get the details for their hosting? and also all the accounts that i have created say that they are owned by myself, is there a way that the user can create an account?

    Thanks once again,

    Seb.
     
  6. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    Basically, cPanel can be driven by some sort of billing software - say WHMCS or ModernBill (WHMCS being easier to setup). When a customer comes to your website, and orders a package from you - the billing software will create the account in cPanel/WHM on your behalf once money is accepted automating the whole process.

    The billing software will then send out an email to the client with the email address they signed up for - giving them all the details for your server's ip address, nameservers etc. plus their user info (username/password/domain/quotas).

    With regards to the owner of the account, it depends on how you are using cPanel/WHM. As a dedicated server or VPS user, you can create reseller accounts and they in turn can create cPanel accounts.

    If you are a reseller yourself however, you will not be able to allow users to create their own cPanel account without going through yourself.

    Hope this helps. Ask for clarification if you need.
     
Loading...

Share This Page