From 1aa5e76d25f0eb1d9d59909b486d9549458c95f0 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 27 Nov 2014 22:22:17 +0800 Subject: Bug 1092578: Decide if an email needs to be encrypted at the time it is generated, not at the time it is sent --- Bugzilla/BugMail.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 59b911878..6466448bc 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -453,6 +453,10 @@ sub sendMail { sub enqueue { my ($vars) = @_; + + # BMO: allow modification of the email at the time it was generated + Bugzilla::Hook::process('bugmail_enqueue', { vars => $vars }); + # we need to flatten all objects to a hash before pushing to the job queue. # the hashes need to be inflated in the dequeue method. $vars->{bug} = _flatten_object($vars->{bug}); @@ -544,6 +548,10 @@ sub _generate_bugmail { $email->content_type_set('multipart/alternative'); } $email->parts_set(\@parts); + + # BMO: allow modification of the email given the enqueued variables + Bugzilla::Hook::process('bugmail_generate', { vars => $vars, email => $email }); + return $email; } -- cgit v1.2.3-24-g4f1b