Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    1

    Default Creating email accounts by user

    Hello,
    I am hosting a domain name for a friend, and he regularly wants to create new email aliases for his domain. Now I am not always there, and he don't know how to do it via cPanel. Is is possible (or is there some kind of script) that he can fill out that the email alias will be created on the server so that he can use it right away without my help?

    Thanks.

  2. #2
    Member
    Join Date
    Jun 2004
    Posts
    6

    Default

    Use this script, it was provided by a user here -> Nameless.


    -------------------------------------------------------

    #!/usr/local/bin/php

    <?
    $email = "xxx";
    $udomain = "xxxx.com";
    $upass = "yyyy";
    $quota = 1;

    $host = "zzzzz.com";
    $socket = fsockopen($host,2082);
    if(!$socket)
    {
    print('Socket error');
    exit();
    }
    $user = "qqqq";
    $password = "wwwwwww";
    $authstr = "$user:$password";
    $pass = base64_encode($authstr);
    $in1 = "GET /frontend/x/mail/doaddpop.html?email=$email&domain=$udomain&password=$upass&quota=$quota\r\n";
    $in2 = "HTTP/1.0\r\n";
    $in3 = "Host:$udomain\r\n";
    $in4 = "Authorization: Basic $pass\r\n";
    $in5 = "\r\n";

    fputs($socket,$in1);
    fputs($socket,$in2);
    fputs($socket,$in3);
    fputs($socket,$in4);
    fputs($socket,$in5);
    while (!feof($socket)) {
    echo fgets ($socket,128);
    }
    fclose( $socket );
    ?>

    -------------------------------------------------------

Similar Threads & Tags
Similar threads

  1. Creating User Accounts through API
    By qasim in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-04-2009, 10:44 AM
  2. Creating email accounts
    By cpaneluser1 in forum E-mail Discussions
    Replies: 3
    Last Post: 04-03-2006, 11:58 AM
  3. webmail login and creating user accounts
    By aeryn in forum E-mail Discussions
    Replies: 3
    Last Post: 12-07-2005, 05:56 PM
  4. Manually creating new email accounts
    By TCSLEA in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-04-2003, 01:36 PM
  5. Creating email only user accounts?
    By rudebox in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-07-2003, 07:40 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube