]> 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:47:37 +0000 (14:47 +0000)
committermkanat%bugzilla.org <>
Fri, 4 Dec 2009 14:47:37 +0000 (14:47 +0000)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat

Bugzilla/Hook.pm
Bugzilla/Mailer.pm

index de35f93b536447bac9c57a04de83e250b7f4389b..4833f44bfb0bc2e5810cc9b3ad5e4da6c788b100 100644 (file)
@@ -476,6 +476,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 page-before_template
index 610523b8a7e9b2dadf043a6c9161a02798b98a8b..2bbf62d1dafb6f9e116a400123ff934d236e8d28 100644 (file)
@@ -174,7 +174,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';