RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Third Party Contributions > Plug-Ins

For more information about the ads and why they're here, please see the FAQ
Reply
  #1  
Old 08-19-2007, 02:42 AM
Registered User
 
Join Date: Jun 2007
Posts: 4
Downloads: 0
Uploads: 0
Default Base Email Sigup

Only one file php. I find it in google, I think you will need so post to 4rum



Code:
<?php
###############################################################
# cPanel Email Account Creator 1.2
###############################################################
# Visit http://www.zubrag.com/scripts/ for updates
############################################################### 
# You can pass following parameters in calling URL. They will
# override those specified below.
# user - new email user
# pass - password
# domain - email domain
# quota - email quota, Mb
# Example: cpemail.php?user=newuser&pass=password&quota=50
############################################################### 
// cPanel info
$cpuser = 'prozone3'; // cPanel username
$cppass = 'prozone1'; // cPanel password
$cpdomain = 'prozone.name'; // cPanel domain or IP
$cpskin = 'x3'; // cPanel skin. Mostly x or x2. 

// See following URL to know how to determine your cPanel skin
// http://www.zubrag.com/articles/deter...panel-skin.php
// Default email info for new email accounts
// These will only be used if not passed via URL
$epass = '123456'; // email password
$edomain = 'prozone.name'; // email domain (usually same as cPanel domain above)
$equota = 20; // 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', $edomain);
$equota = getVar('quota', $equota);
$msg = '';

if (!empty($euser)) {
 // Create email account
 $f = fopen ("http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?email=$euser&domain=$edomain&password=$epass&quota=$equota", "r");
 if (!$f) {
  $msg = 'Cannot create email account. Possible reasons: "fopen" function allowed on your server, PHP is running in SAFE mode';
 }
 else {
  $msg = "<h2>Email account {$euser}@{$edomain} created.</h2>";

  // Check result
  while (!feof ($f)) {
   $line = fgets ($f, 1024);
   if (ereg ("already exists", $line, $out)) {
    $msg = "<h2>Email account {$euser}@{$edomain} already exists.</h2>";
    break;
   }
  }
  fclose($f);
 }
}
?>

<html>
<head><title>cPanel Email Account Creator</title></head>
<body>
<?php echo $msg; ?>
<h1>cPanel Email Account Creator</h1>
<form name="frmEmail" method="post">
<table width="400" border="0">
<tr><td>Username:</td><td><input name="user" size="20" value="<?php echo htmlentities($euser); ?>" /></td></tr>
<tr><td>Password:</td><td><input name="pass" size="20" type="password" /></td></tr>
<tr><td colspan="2" align="center"><input name="submit" type="submit" value="Create Email Account" /></td></tr>
</table>
</form>
</body>
</html>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

For more information about the ads and why they're here, please see the FAQ

All times are GMT. The time now is 04:19 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright © 2006-2008 RoundCube Webmail Community