CPanel POP3 mailbox autocreation !!!

chr_nikol

BANNED
Aug 16, 2004
21
0
151
Hello,
i will be short and clear.

I have a site that provides free email services like yahoo or hotmail does.

I want to make a php script that will automatically add new pop3 mail users on my account!

How this can be done ?

From cpanel they said i can use:
/usr/local/cpanel/cpanel-email
but i tried and can't make it work !!!

Any help guys would be great !!!
 

Q-IS

Registered
Oct 10, 2004
1
0
151
I don't know if this is agains the rules, but here's a PHP script that can create POP3 emails with a form:

<?php
// Change this:

$user_domain="domein.ext"; // Your domain, no www, http:// and / at the end!!!
$user_cpanel="domein"; // Cpanel username
$user_pass="demo"; // Cpanel password
$user_theme="x"; // Cpanel theme (afhter /frontend/)

// Warning: Be careful with the code under this line!


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);
return " DONE!<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 " DONE; Email 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 POP3 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 neccesary when deleting)</p>
<p>megs <input type="text" name="megs" size="20"> (not neccesary when deleting)</p>
<p><input type="submit" value="make" name="make"><input type="submit" value="remove" name="remove"><input type="reset" value="Clear" name="B2"></p>
</form>

</body>

</html>
 

hasif

Member
Nov 13, 2004
5
0
151
pls... help me

Hi,

I want CPanel Sub-Domain autocreation pls....!!!!!

:confused: Thanks in advance.