aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas <skangas@skangas.se>2011-03-20 23:13:01 +0100
committerStefan Kangas <skangas@skangas.se>2011-03-20 23:13:11 +0100
commit419487240780f1e789c8f7d948167feb8f010e03 (patch)
tree0f0b120f19c1f88579e3347a294ab7a9fa2416cf
parent68708cd2430d4da548673fd612c891413448fddf (diff)
Fix silly bug in last commit
-rwxr-xr-xfripost-adduser7
1 files changed, 4 insertions, 3 deletions
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.";