|
|
@ -145,10 +145,11 @@ sub send_email {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
my $tt = Template->new();
|
|
|
|
my $tt = Template->new();
|
|
|
|
map { my $out;
|
|
|
|
foreach my $field (keys %{$template}) {
|
|
|
|
$tt->process(\$template->{$_}, $vars, \$out);
|
|
|
|
my $out;
|
|
|
|
$out and $template->{$_} = $out;
|
|
|
|
$tt->process(\$template->{$field}, $vars, \$out);
|
|
|
|
} keys %{$template};
|
|
|
|
$out and $template->{$field} = $out;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
die "'To' header is empty in the email" unless $event->{interval_notify};
|
|
|
|
die "'To' header is empty in the email" unless $event->{interval_notify};
|
|
|
|
die "'From' header is empty in the email" unless $template->{from_email};
|
|
|
|
die "'From' header is empty in the email" unless $template->{from_email};
|
|
|
|