summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-12-30 09:32:36 +0100
committerlpsolit%gmail.com <>2005-12-30 09:32:36 +0100
commit4c12fe8d354b6c3361992bf4b965c5f54e6f2b2b (patch)
tree5e2f885765c81494df336411307466d35a522de2 /Bugzilla
parent9d57a9189426bedff1ae122c5e4a1a7e06fed8c4 (diff)
downloadbugzilla-4c12fe8d354b6c3361992bf4b965c5f54e6f2b2b.tar.gz
bugzilla-4c12fe8d354b6c3361992bf4b965c5f54e6f2b2b.tar.xz
Bug 284590: When using SMTP, emails are not sent to the CC list associated with the flag type - Patch by Teemu Mannermaa <wicked@etlicon.fi> r=wicked a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Flag.pm25
1 files changed, 14 insertions, 11 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index b4c1bc595..7b074887a 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -977,7 +977,6 @@ sub notify {
my ($flag, $template_file) = @_;
my $template = Bugzilla->template;
- my $vars = {};
# There is nobody to notify.
return unless ($flag->{'addressee'} || $flag->{'type'}->{'cc_list'});
@@ -1007,17 +1006,21 @@ sub notify {
# If there is nobody left to notify, return.
return unless ($flag->{'addressee'} || $flag->{'type'}->{'cc_list'});
- $vars->{'flag'} = $flag;
-
- my $message;
- my $rv =
- $template->process($template_file, $vars, \$message);
- if (!$rv) {
- Bugzilla->cgi->header();
- ThrowTemplateError($template->error());
- }
+ # Process and send notification for each recipient
+ foreach my $to ($flag->{'addressee'} ? $flag->{'addressee'}->email : '',
+ split(/[, ]+/, $flag->{'type'}->{'cc_list'}))
+ {
+ next unless $to;
+ my $vars = { 'flag' => $flag, 'to' => $to };
+ my $message;
+ my $rv = $template->process($template_file, $vars, \$message);
+ if (!$rv) {
+ Bugzilla->cgi->header();
+ ThrowTemplateError($template->error());
+ }
- Bugzilla::BugMail::MessageToMTA($message);
+ Bugzilla::BugMail::MessageToMTA($message);
+ }
}
# Cancel all request flags from the attachment being obsoleted.