Commit 1b7c0130 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

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

parents 428f26bb 0630b4c6
......@@ -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