summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2014-10-16 18:09:15 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2014-10-16 18:09:15 +0200
commit7ce5b04d20684101748812cf2bd5e7d6275bd5e7 (patch)
tree590882b1275ec3729b8fa13ed5b040da3851b234 /Bugzilla
parentb1bdb0ed35a75233edc1a7c59b697bb08adc38c7 (diff)
downloadbugzilla-7ce5b04d20684101748812cf2bd5e7d6275bd5e7.tar.gz
bugzilla-7ce5b04d20684101748812cf2bd5e7d6275bd5e7.tar.xz
Bug 1082557: Use a persistent connection to the SMTP server for improved performance
r=dylan a=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Mailer.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm
index 3c8815306..01e0dc255 100644
--- a/Bugzilla/Mailer.pm
+++ b/Bugzilla/Mailer.pm
@@ -25,7 +25,7 @@ use Encode qw(encode);
use Encode::MIME::Header;
use Email::MIME;
use Email::Sender::Simple qw(sendmail);
-use Email::Sender::Transport::SMTP;
+use Email::Sender::Transport::SMTP::Persistent;
use Bugzilla::Sender::Transport::Sendmail;
sub MessageToMTA {
@@ -127,7 +127,8 @@ sub MessageToMTA {
}
if ($method eq "SMTP") {
- $transport = Email::Sender::Transport::SMTP->new({
+ $transport = Bugzilla->request_cache->{smtp} //=
+ Email::Sender::Transport::SMTP::Persistent->new({
host => Bugzilla->params->{'smtpserver'},
sasl_username => Bugzilla->params->{'smtp_username'},
sasl_password => Bugzilla->params->{'smtp_password'},