Commit af09943a authored by Clément OUDOT's avatar Clément OUDOT

Merge branch 'quickfix-smtp-port-conf-save' into 'master'

Use specified port when testing SMTP conf

See merge request lemonldap-ng/lemonldap-ng!52
parents 6f2f263c 2f93799f
......@@ -325,7 +325,11 @@ sub tests {
if ($@);
# Create SMTP object
my $smtp = Net::SMTP->new( $conf->{SMTPServer}, Timeout => 5 );
my $smtp = Net::SMTP->new(
$conf->{SMTPServer},
Timeout => 5,
( $conf->{SMTPPort} ? ( Port => $conf->{SMTPPort} ) : () ),
);
return ( 1,
"SMTP connection to " . $conf->{SMTPServer} . " failed" )
unless ($smtp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment