From 419487240780f1e789c8f7d948167feb8f010e03 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 20 Mar 2011 23:13:01 +0100 Subject: Fix silly bug in last commit --- fripost-adduser | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fripost-adduser') diff --git a/fripost-adduser b/fripost-adduser index ba97cdf..8f2486a 100755 --- a/fripost-adduser +++ b/fripost-adduser @@ -105,12 +105,12 @@ $msg->attr('content-type.charset' => 'utf-8'); { my ($vars, $data); $vars = {}; + $tt->process('new_user_mail.tt', $vars, \$data) || die $tt->error(), '\n'; - - $msg->replace(To => $user->{username}); $msg->data($data); + $msg->replace(To => $user->{username}); unless ($conf->{pretend}) { $msg->send() unless $conf->{pretend};; @@ -131,9 +131,9 @@ $msg->attr('content-type.charset' => 'utf-8'); pass => $user->{password}, real => $user->{name}, }; + $tt->process('user_info.tt', $vars, \$data) || die $tt->error(), '\n'; - $msg->data($data); dsay "-----------------------------------"; @@ -145,6 +145,7 @@ $msg->attr('content-type.charset' => 'utf-8'); confirm_or_abort("Send email with login information? "); my $to = prompt_email("Where should the email be sent? "); $msg->replace(To => $to); + if (!$conf->{pretend}) { $msg->send; say "Credentials sent."; -- cgit v1.2.3