From a8c63de19d723ad17f5397e352a7c5604393be85 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 10 Feb 2017 17:35:04 +0300 Subject: [PATCH] Pass smtp_debug parameter to SMTP transport, remove sysread hack (breaks Email::Sender::Transport::SMTP) --- Bugzilla/Mailer.pm | 3 +++ HTTPServerSimple.pl | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 03e859b4f..cf7c44430 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -151,6 +151,9 @@ sub MessageToMTA { username => Bugzilla->params->{"smtp_username"}, password => Bugzilla->params->{"smtp_password"}, helo => $hostname; + if (Bugzilla->params->{smtp_debug}) { + push @args, debug => 1; + } } Bugzilla::Hook::process('mailer_before_send', diff --git a/HTTPServerSimple.pl b/HTTPServerSimple.pl index 7645fe328..8d5e4e777 100755 --- a/HTTPServerSimple.pl +++ b/HTTPServerSimple.pl @@ -12,8 +12,6 @@ BEGIN ($dir) = $dir =~ /^(.*)$/s; chdir($dir); $Bugzilla::HTTPServerSimple::DOCROOT = $dir; - # Force everyone to use buffered input! - *CORE::GLOBAL::sysread = sub(*$$;$) { read $_[0], $_[1], $_[2], $_[3]; }; } use lib qw(.);