From 43b7dc314234e476a80d9acbd07292d7286cca5a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 2 Apr 2008 22:42:25 +0000 Subject: Bug 405946: Some emails are not sent in the language chosen by the addressee - Patch by Frédéric Buclin r=wurblzap a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- whine.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'whine.pl') 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'}; -- cgit v1.2.3-24-g4f1b