From 4f5f0d062c445cd8b8db22ec72f2a03aeaacc830 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Fri, 4 Dec 2009 14:46:45 +0000 Subject: [PATCH] Bug 531500: Allow the mailer_before_send hook to modify the arguments passed to Email::Send Patch by Max Kanat-Alexander r=dkl, a=mkanat git-svn-id: svn://10.0.0.236/trunk@259172 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bugzilla/Hook.pm | 3 +++ mozilla/webtools/bugzilla/Bugzilla/Mailer.pm | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/Bugzilla/Hook.pm b/mozilla/webtools/bugzilla/Bugzilla/Hook.pm index 7ee033f8651..b042f36ad68 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Hook.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Hook.pm @@ -482,6 +482,9 @@ Params: =item C - The C object that's about to be sent. +=item C - An arrayref that's passed as C to +L. + =back =head2 object_before_create diff --git a/mozilla/webtools/bugzilla/Bugzilla/Mailer.pm b/mozilla/webtools/bugzilla/Bugzilla/Mailer.pm index 71dc8f1f51f..fb9c5a7cac3 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Mailer.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Mailer.pm @@ -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';