Email is not a valid email address, please go back."); if ($password != $password2) print_error("The passwords that you supplied don't match!"); if (!check_string($name)) print_error("The name that you have supplied at Name is not valid, please go back."); $result = db_query("SELECT * FROM alias WHERE address='$username'"); if ($result['rows'] == 1) print_error("This email address already exists, please choose a different one."); $result = db_query("INSERT INTO alias (address,goto,domain,create_date,change_date) VALUES('$username','$username','$sessid[domain]',NOW(),NOW())"); if ($result['rows'] != 1) print_error("Unable to add: $username to the alias table!"); if ($use_subdir == "YES") $maildir = $sessid[domain] . "/" . $maildir; if (!empty($quota_table)) { $result = db_query("INSERT INTO mailbox (username,password,name,maildir,domain,create_date,change_date,$quota_table) VALUES('$username','$passwd','$name','$maildir','$sessid[domain]',NOW(),NOW(),'$quota') "); } else { $result = db_query("INSERT INTO mailbox (username,password,name,maildir,domain,create_date,change_date) VALUES('$username','$passwd','$name','$maildir','$sessid[domain]',NOW(),NOW())"); } if ($result['rows'] == 1) { $headers = "From: $sessid[username]"; $subject = "Welcome"; $message = "Hi $name,\n\nWelcome to your new email account.\n\n"; print "$username has been added to the mailbox table!\n"; print "

\n"; print "NOTE:\n"; if (!mail($username, $subject, $message, $headers)) { print "The user needs to first receive an email in order to use the account.
\n"; } print "User needs to login with the full email address, in this case: $username\n"; print "

\n"; } else { print_error("Unable to add: $username to the mailbox table!"); } } ?> Create a new local mailbox for your domain.

\n"; ?>
Email:@
Password:Password for POP/IMAP
Password (again): 
Name:Full name
Quota: