summaryrefslogtreecommitdiffstats
path: root/whine.pl
diff options
context:
space:
mode:
Diffstat (limited to 'whine.pl')
-rwxr-xr-xwhine.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/whine.pl b/whine.pl
index 8f4671321..e49e4816a 100755
--- a/whine.pl
+++ b/whine.pl
@@ -353,10 +353,11 @@ while (my $event = get_next_event) {
#
sub mail {
my $args = shift;
+ my $addressee = $args->{recipient};
+ # Don't send mail to someone whose bugmail notification is disabled.
+ return if $addressee->email_disabled;
- # Don't send mail to someone on the nomail list.
- return if $args->{recipient}->email_disabled;
-
+ my $template = Bugzilla->template_inner($addressee->settings->{'lang'}->{'value'});
my $msg = ''; # it's a temporary variable to hold the template output
$args->{'alternatives'} ||= [];
@@ -387,6 +388,7 @@ sub mail {
$template->process("whine/multipart-mime.txt.tmpl", $args, \$msg)
or die($template->error());
+ Bugzilla->template_inner("");
MessageToMTA($msg);
delete $args->{'boundary'};