require("/home/httpd/phplib/qmail.inc");
$qmail_date = "v1";
$qmail_email = new register_email ;
$sql = "select pw_name from ".$qmail_date;
$qmail_email->query($sql);
while ($qmail_email->next_record())
{
$qmail_user = $qmail_email->f("pw_name");
$passwd = "12345";
$str_command = "sudo /var/vpopmail/bin/vadduser " .$qmail_user.;
$str_command = $str_command."@mail.com".$passwd." -q 10000000 < /home/n";
@exec($str_command,$str,&$result);
if ($result != 0 )
{
echo "command string is :".$str_command." , command is failed!!!<br>";
$error_info = "在执行vadduser命令时失败";
$address = "From:
[email protected]\nReply-To:
[email protected]\n" ;
mail("
[email protected]", $error_info , $message,$address );
}
}
$qmail_email->free();