summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Mailer.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Mailer.pm')
-rw-r--r--Bugzilla/Mailer.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm
index 7789af018..381422821 100644
--- a/Bugzilla/Mailer.pm
+++ b/Bugzilla/Mailer.pm
@@ -166,6 +166,9 @@ sub MessageToMTA {
Bugzilla::Hook::process('mailer_before_send',
{ email => $email, mailer_args => \@args });
+ # Allow for extensions to to drop the bugmail by clearing the 'to' header
+ return if $email->header('to') eq '';
+
$email->walk_parts(sub {
my ($part) = @_;
return if $part->parts > 1; # Top-level