]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 284590: When using SMTP, emails are not sent to the CC list associated with the...
authorlpsolit%gmail.com <>
Fri, 30 Dec 2005 08:34:50 +0000 (08:34 +0000)
committerlpsolit%gmail.com <>
Fri, 30 Dec 2005 08:34:50 +0000 (08:34 +0000)
by Teemu Mannermaa <wicked@etlicon.fi> r=wicked a=justdave

Bugzilla/Flag.pm
template/en/default/request/email.txt.tmpl

index 760731b28134bd6098b42696b7792cf324d89ea9..643c6635b691bd9521be9b1612efa872140602d4 100644 (file)
@@ -966,15 +966,21 @@ sub notify {
 
     $::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 $message;
+        $::vars->{'to'} = $to;
+        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.
index 9c3be3387546c040e0cd6e3b7d9c5830fe4c918b..6e92c72ca32196fe16a82013d821b1469dd141e8 100644 (file)
@@ -38,8 +38,7 @@
   [% subject_status = statuses.${flag.status} %]
 [% END %]
 From: bugzilla-request-daemon
-To: [% flag.addressee.email %]
-CC: [% flag.type.cc_list %]
+To: [% to %]
 Subject: [% flag.type.name %] [%+ subject_status %]: [[% terms.Bug %] [%+ flag.target.bug.id %]] [% flag.target.bug.summary %]
 [%- IF flag.target.attachment.exists %] :
   [Attachment [% flag.target.attachment.id %]] [% flag.target.attachment.summary %][% END %]