projects
/
aymargeddon
/
current.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2f3eb0a
)
use Mail::Mailer instead of mail for sending restriation email.
author
Aymargeddon Team
<benni@aymargeddon.de>
Sun, 23 Sep 2012 08:01:41 +0000
(10:01 +0200)
committer
Aymargeddon Team
<benni@aymargeddon.de>
Sun, 23 Sep 2012 08:01:41 +0000
(10:01 +0200)
src/FROGS/DataBase.pm
patch
|
blob
|
history
diff --git
a/src/FROGS/DataBase.pm
b/src/FROGS/DataBase.pm
index
e41893b
..
7bc8de1
100644
(file)
--- a/
src/FROGS/DataBase.pm
+++ b/
src/FROGS/DataBase.pm
@@
-397,16
+397,28
@@
sub new_account{
});
$self->commit();
});
$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;
# 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);
+
#
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;
}
return $pwd;
}