]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 531500: Allow the mailer_before_send hook to modify the arguments passed to Email...
authormkanat%bugzilla.org <>
Fri, 4 Dec 2009 14:46:45 +0000 (14:46 +0000)
committermkanat%bugzilla.org <>
Fri, 4 Dec 2009 14:46:45 +0000 (14:46 +0000)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat

Bugzilla/Hook.pm
Bugzilla/Mailer.pm

index 7ee033f8651bc451d3fd26d4741b2f7442f34fe0..b042f36ad680fa68f62162c032daf89e5640a749 100644 (file)
@@ -482,6 +482,9 @@ Params:
 
 =item C<email> - The C<Email::MIME> object that's about to be sent.
 
+=item C<mailer_args> - An arrayref that's passed as C<mailer_args> to
+L<Email::Send/new>.
+
 =back
 
 =head2 object_before_create
index 71dc8f1f51f18c66ce051f7e3be662413b9b73c4..fb9c5a7cac30c8e486f5b8346702010f38b2857d 100644 (file)
@@ -171,7 +171,8 @@ sub MessageToMTA {
                     Debug => Bugzilla->params->{'smtp_debug'};
     }
 
-    Bugzilla::Hook::process('mailer_before_send', { email => $email });
+    Bugzilla::Hook::process('mailer_before_send', 
+                            { email => $email, mailer_args => \@args });
 
     if ($method eq "Test") {
         my $filename = bz_locations()->{'datadir'} . '/mailer.testfile';