});
$self->commit();
- my $mail = "From: registration\@aymargeddon.de\nTo: $name <$email>\n"
- . "Subject: ".$self->loc('REGISTER_MAIL_SUBJECT')."\n\n"
- . $self->loc('REGISTER_MAIL_TEXT', $name, $login, $pwd)."\n";
+ # my $mail = "From: registration\@aymargeddon.de\nTo: $name <$email>\n"
+ # . "Subject: ".$self->loc('REGISTER_MAIL_SUBJECT')."\n\n"
+ # . $self->loc('REGISTER_MAIL_TEXT', $name, $login, $pwd)."\n";
# print $mail;
-
- open(SENDMAIL, "|mail $email") or Util::log("Can't fork for sendmail: $!",0);
- print SENDMAIL $mail;
- close(SENDMAIL) or Util::log("sendmail didn't close nicely",0);
-
+# aus man mail:
+# env MAILRC=/dev/null from=scriptreply@domain smtp=host \
+# smtp-auth-user=login smtp-auth-password=secret \
+# smtp-auth=login mailx -n -s "subject" \
+# -a attachment_file recipient@domain <content_file
+
+ # open(SENDMAIL, "|mail $email") or Util::log("Can't fork for sendmail: $!",0);
+ # print SENDMAIL $mail;
+ # close(SENDMAIL) or Util::log("sendmail didn't close nicely",0);
+
+ use Mail::Mailer;
+
+ my $mailer = Mail::Mailer->new();
+
+ $mailer->open({ From => 'benni@aymargeddon.de',
+ To => "$name <$email>",
+ Subject => $self->loc('REGISTER_MAIL_SUBJECT'),
+ })
+ or Util::log("can't send registration mail to $email: $!\n");
+ print $mailer $self->loc('REGISTER_MAIL_TEXT', $name, $login, $pwd);
+ $mailer->close();
+
return $pwd;
}
($user,$pwd,$adminpwd) = $self->quote_all($user,$pwd,$adminpwd);
- Util::log("Adminpassword: $adminpwd, password: $pwd",2);
+ # Util::log("Adminpassword: $adminpwd, password: $pwd",2);
my ($player, $sec);
if($adminpwd eq $pwd){
$c .= " AND $cond" if $cond;
Util::log($c."\n",1);
my $unused = $self->select_array('MAP','LOCATION','',$c);
+
+ print $unused;
Util::log(Dumper(@$unused),1);