0) { mysql_close(); // Send Confirmation Mail if(db_getconfval("withmail") == "1") { require_once "Mail.php"; $from = $mrecv." <".$mname.">"; $to = $benutzer["Vorname"]." ".$benutzer["Nachname"]." <".$benutzer["Email"].">"; $subject = "VPN Account created!"; $body = "Dear ".$benutzer["Vorname"]." ".$benutzer["Nachname"].",\n\nyour ".$mrecv." account has been created!\nYou can now login on with this credentials:\n\n#########################################################\nUsername: ".$benutzer["Nickname"]."\nPassword: ".$benutzer["Kennwort"]."\n#########################################################\nYou can change your password in the user section.\n\nAll files, programms and other stuff can be found on the homepage!\nTo start using your VPN Connection you have to download your config-file and your certificates!\nInstall everything as it is described in the README.txt!\n\nHave fun!!!\n\nIf you have questions write me an email!\n\n".$mrecv."\n"; $host = $mserv; $username = $muser; $password = $mpass; $headers = array ( 'From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ( 'host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { // evt deaktivieren echo("

" . $mail->getMessage() . "

"); } } // Finish mysql_close(); header ("Location: ".$moduleurl."&uebergabe2=1"); } else { mysql_close(); echo "Fehler beim Anlegen des Benutzers.
\n"; } ?>