Cpanel Hotmail type email system

unklellis

Registered
Jan 2, 2007
2
0
151
Hello,

Is there any software available that I could use to create a Hotmail type email system which I can control through my Cpanel?

I'm basically building a site where potensially there could be upto 500 email addresses needed - and instead of creatating them all manually, is there a way users could securely & safely do it them selves?

Any advice would be greatly recieved!
I've got no idea where to start.

Thanks,

MAT
 

freakin'me

Member
Jul 8, 2005
23
0
151
You can of course create a script yourself (PHP, Perl, etc) that communicates with cPanel, and adds an email address. All that's left is some error checking from your side (was it created succesfully, if not, what was the error?), and let these 500 people fill in the required data themselves. If you need help, feel free to ask...
 

freakin'me

Member
Jul 8, 2005
23
0
151
I have a script here that should do what you want:

PHP:
<?php  

$user_domain="domein.ext"; // Domainname, without http:// or www. without a traiing slash
$user_cpanel="domein";  // cpanel username
$user_pass="demo";    // cPanel-password 
$user_theme="x";      // cPanel-theme (by default 'x') 

function create_acct($acct, $domain, $meg, $mpassword, $cpaneluser, $cpanelpass, $user_theme) {  
    $o = "http://$cpaneluser:[email protected]$domain:2082/frontend/".$user_theme."/mail/doaddpop.html?email=$acct&domain=$domain&password=$mpassword&quota=3";  
    $tester = @file($o); 

if( strstr($tester[109], 'Sorry the account') ) 
    { 
        return 'Sorry, this address exists already. Please try again.'; 
    } 
    else 
    { 
        return 'Your email address was addes succesfully..<br>' 
              .'Your username is is: '. $_POST['acct'] .'@domein.nl' 
              .'<br>Your password is: '. $_POST['pass'] 
              ."<br><br>Go to <a href=http://$_POST[acct]@domein.nl:$_POST[pass]@domein.nl:2095/>" 
              ."http://$_POST[acct]@domein.nl:$_POST[pass]@domein.nl:2095/</a> in order to manage your account<br><br>"; 
    }  
 
}  

function remove_acct($acct, $domain, $cpaneluser, $cpanelpass, $user_theme) {  
    $o = "http://$cpaneluser:[email protected]$domain:2082/frontend/".$user_theme."/mail/realdelpop.html?email=$acct&domain=$domain";  
    $tester = @file($o);  
    return "succesfully deleted<br>"; 
}  

if ($_POST['make']) 
{ 
echo  create_acct($_POST['acct'],$user_domain,$_POST['megs'],$_POST['pass'],$user_cpanel,$user_pass, $user_theme); 
} 
elseif ($_POST['remove']) 
{ 
echo  remove_acct($_POST['acct'],$user_domain,$user_cpanel,$user_pass, $user_theme); 
} 
?>  
<html> 

<head> 
<meta http-equiv="Content-Language" content="nl"> 
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 
<title>Create/delete mail account</title> 
</head> 

<body> 

<form method="POST" action="<? echo $PHP_SELF; ?>"> 
    <p>username <input type="text" name="acct" size="20">@<? echo $user_domain; ?></p> 
    <p>password <input type="text" name="pass" size="20"> (not needed when deleting)</p> 
    <p>quota <input type="text" name="megs" size="20"> (not needed when deleted)</p>     
    <p><input type="submit" value="make" name="make"><input type="submit" value="remove" name="remove"></p> 
</form> 

</body> 

</html>
I found it here: http://phpfreakz.nl/library.php?sid=15224
You're free to copy/redistrubute it.
 
Last edited:

unklellis

Registered
Jan 2, 2007
2
0
151
Wow, man that's frekin' rad!
I've only briefly had a look through it but it seems spot on.
When I get 5 mins I'll try it out - I'm sure I'll have some questions.

Many thanks!

MAT
 

moonwizard

Member
Mar 31, 2007
5
0
151
Safe?

Hello! Is it safe creating accounts this way? Can be the site hacked if this script is used?

Can this script create emails in different domains all parked in the same CPanel account?

Thank you very much!
 
Last edited: