From: Dylan William Hardison Date: Tue, 21 Oct 2014 18:30:38 +0000 (-0400) Subject: Bug 1073380 - Pass the hostname and port as two separate arguments to Email::Sender X-Git-Tag: bugzilla-5.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=226b92c37fed3616a2c9d23693ed9a4321bb879f;p=thirdparty%2Fbugzilla.git Bug 1073380 - Pass the hostname and port as two separate arguments to Email::Sender r=dkl a=glob --- diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 01e0dc2559..4447d40462 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -127,9 +127,11 @@ sub MessageToMTA { } if ($method eq "SMTP") { + my ($host, $port) = split(/:/, Bugzilla->params->{'smtpserver'}, 2); $transport = Bugzilla->request_cache->{smtp} //= Email::Sender::Transport::SMTP::Persistent->new({ - host => Bugzilla->params->{'smtpserver'}, + host => $host, + defined($port) ? (port => $port) : (), sasl_username => Bugzilla->params->{'smtp_username'}, sasl_password => Bugzilla->params->{'smtp_password'}, helo => $hostname,