diff options
Diffstat (limited to 'Bugzilla/Mailer.pm')
-rw-r--r-- | Bugzilla/Mailer.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 1ffbd44e3..d3810b72b 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -53,10 +53,15 @@ use Email::MIME::Modifier; use Email::Send; sub MessageToMTA { - my ($msg) = (@_); + my ($msg, $send_now) = (@_); my $method = Bugzilla->params->{'mail_delivery_method'}; return if $method eq 'None'; + if (Bugzilla->params->{'use_mailer_queue'} and !$send_now) { + Bugzilla->job_queue->insert('send_mail', { msg => $msg }); + return; + } + my $email = ref($msg) ? $msg : Email::MIME->new($msg); # We add this header to uniquely identify all email that we |