]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1073380 - Pass the hostname and port as two separate arguments to Email::Sender
authorDylan William Hardison <dylan@hardison.net>
Tue, 21 Oct 2014 18:30:38 +0000 (14:30 -0400)
committerDylan William Hardison <dylan@hardison.net>
Tue, 21 Oct 2014 18:30:38 +0000 (14:30 -0400)
r=dkl a=glob

Bugzilla/Mailer.pm

index 01e0dc25597563780b615258bb08cfc7f169cb02..4447d4046207001829f68aeb8e487e609f98c09d 100644 (file)
@@ -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,