Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
1b7c0130
Commit
1b7c0130
authored
Oct 25, 2017
by
Robert Lyon
Committed by
Gerrit Code Review
Oct 25, 2017
Browse files
Merge "Bug 1713441: set a custom SMTP port in case no SMTP user name is specified"
parents
428f26bb
0630b4c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/user.php
View file @
1b7c0130
...
...
@@ -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'
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment