i just wanted to add this piece here: to make an actual plugin for the Roundcubemail you only need this code below. it is the mail.php without the password protect file..
$antispam = false;
// cPanel info
$cpuser = 'maincontrol panel username'; // cPanel username
$cppass = 'control panel password here'; // cPanel password
$cpdomain = 'main hosting domain ex: domain.com'; // cPanel domain or IP
$cpskin = 'x3';
$epass = 'hispassword'; // email password leave this as is..
$equota = 300; // amount of space in megabytes
###############################################################
# END OF SETTINGS
###############################################################
function getVar($name, $def = '') {
if (isset($_REQUEST[$name]))
return $_REQUEST[$name];
else
return $def;
}
// check if overrides passed
$euser = getVar('user', '');
$epass = getVar('pass', $epass);
$edomain = getVar('domain','');
$equota = getVar('quota', $equota);
$msg = '';
if (!empty($euser))
while(true) {
if ($antispam) {
@session_start(); // start session if not started yet
if ($_SESSION['AntiSpamImage'] != $_REQUEST['anti_spam_code']) {
// set antispam string to something random, in order to avoid reusing it once again
$_SESSION['AntiSpamImage'] = rand(1,9999999);
// let user know incorrect code entered
$msg = '
Incorrect antispam code entered.
';
break;
}
else {
// set antispam string to something random, in order to avoid reusing it once again
$_SESSION['AntiSpamImage'] = rand(1,9999999);
}
}
// Create email account
$f = fopen ("http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?email=$euser&domain=$edomain&password=$epass"a=$equota", "r");
if (!$f) {
$msg = 'Cannot create email account. Possible reasons: "fopen" function allowed on your server, PHP is running in SAFE mode';
break;
}
$msg = "Your Email {$euser}@{$edomain} has been created.
";
// Check result
while (!feof ($f)) {
$line = fgets ($f, 1024);
if (ereg ("already exists", $line, $out)) {
$msg = "Email account {$euser}@{$edomain} already exists.
";
break;
}
}
@fclose($f);
break;
}
?>
'.$msg.''; ?>
Enter Name,domain and password for your email account.
i just wanted to add this piece here: to make an actual plugin for the Roundcubemail you only need this code below. it is the mail.php without the password protect file..
$antispam = false;
// cPanel info
$cpuser = 'maincontrol panel username'; // cPanel username
$cppass = 'control panel password here'; // cPanel password
$cpdomain = 'main hosting domain ex: domain.com'; // cPanel domain or IP
$cpskin = 'x3';
$epass = 'hispassword'; // email password leave this as is..
$equota = 300; // amount of space in megabytes
###############################################################
# END OF SETTINGS
###############################################################
function getVar($name, $def = '') {
if (isset($_REQUEST[$name]))
return $_REQUEST[$name];
else
return $def;
}
// check if overrides passed
$euser = getVar('user', '');
$epass = getVar('pass', $epass);
$edomain = getVar('domain','');
$equota = getVar('quota', $equota);
$msg = '';
if (!empty($euser))
while(true) {
if ($antispam) {
@session_start(); // start session if not started yet
if ($_SESSION['AntiSpamImage'] != $_REQUEST['anti_spam_code']) {
// set antispam string to something random, in order to avoid reusing it once again
$_SESSION['AntiSpamImage'] = rand(1,9999999);
// let user know incorrect code entered
$msg = '
Incorrect antispam code entered.
';
break;
}
else {
// set antispam string to something random, in order to avoid reusing it once again
$_SESSION['AntiSpamImage'] = rand(1,9999999);
}
}
// Create email account
$f = fopen ("http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?email=$euser&domain=$edomain&password=$epass"a=$equota", "r");
if (!$f) {
$msg = 'Cannot create email account. Possible reasons: "fopen" function allowed on your server, PHP is running in SAFE mode';
break;
}
$msg = "Your Email {$euser}@{$edomain} has been created.
";
// Check result
while (!feof ($f)) {
$line = fgets ($f, 1024);
if (ereg ("already exists", $line, $out)) {
$msg = "Email account {$euser}@{$edomain} already exists.
";
break;
}
}
@fclose($f);
break;
}
?>
'.$msg.''; ?>
hi.
I think that Rosali has made a Cpanel login plugin from portions of the code above... i would recommend just waiting a day or two until it is released...
best regards
Antony
Yes, I have coded a driver for my register plugin. Thanks to Web Hosting : Professional Web Hosting from Just Host (http://www.justhost.com) for contributions by setting up a cPanel test environment for free.
The driver is included into MyRoundcube plugins bundle (Roundcube 0.6-rc bundle v.1.2).
You are looking for _register_ plugin (myroundcube - RoundCube Plugins - Google Project Hosting (http://myroundcube.googlecode.com)).
We are unable to get screen for User Registration in RC0.7. And also which we found is for Hmail server only. It will be a gr8 help for us if we found a plugin or scripts for cPanel.