Commit 5f39e8f0 authored by Dimitri's avatar Dimitri Committed by Robert Lyon
Browse files

Bug 1713441: set a custom SMTP port in case no SMTP user name is specified

behatnotneeded

Change-Id: Id1a1d1e99d58b9b2c3567ee36eebaeb70c9944e6
(cherry picked from commit 0630b4c6)
parent 00dd3a00
......@@ -753,13 +753,13 @@ function email_user($userto, $userfrom, $subject, $messagetext, $messagehtml='',
$mail->IsSMTP();
// use SMTP directly
$mail->Host = get_config('smtphosts');
$mail->Port = is_numeric(get_config('smtpport')) ? get_config('smtpport') : 25;
if (get_config('smtpuser')) {
// Use SMTP authentication
$mail->SMTPAuth = true;
$mail->Username = get_config('smtpuser');
$mail->Password = get_config('smtppass');
$mail->SMTPSecure = get_config('smtpsecure');
$mail->Port = get_config('smtpport');
if (get_config('smtpsecure') && !get_config('smtpport')) {
// Encrypted connection with no port. Use default one.
if (get_config('smtpsecure') == 'ssl') {
......
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