Commit 20c4196f authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

Add SMTP port and secure connection config parameters (bug #670683)



SMTP server might require secure connection.
Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
parent 4ce12125
......@@ -139,14 +139,22 @@ $cfg->sendemail = true;
// $cfg->perftolog = true;
// if neither are set, performance info wont be captured.
// mail handling
// if you want mahara to use smtp servers to send mail, enter one or more here
// Mail handling
// If you want mahara to use SMTP servers to send mail, enter one or more here
// blank means mahara will use the default PHP method.
// $cfg->smtphosts = 'mail.a.com;mail.b.com';
// If you have specified an smtp server above, and the server requires authentication,
// enter them here
// $cfg->smtphosts = 'smtp1.example.com;smtp2.example.com';
// If smtp server uses port number different from 25 (e.g. for secure connections,
// port 465 is usually used with ssl, port 587 is usually used with tls),
// specify it below. Alternatively you may specify the port in smtphosts
// definition above using format [hostname:port] (e.g. 'smtp1.example.com:465').
// $cfg->smtpport = 465;
// If you have specified an smtp server above, and the server requires
// authentication, enter user credentials here:
// $cfg->smtpuser = '';
// $cfg->smtppass = '';
// If smtp server requres secure connection, specify its type below. Valid options
// are 'ssl' or 'tls'.
// $cfg->smtpsecure = 'ssl';
// Variable Envelope Return Path Handling
// If you want mahara to keep track of email addresses which generate a
......
......@@ -340,9 +340,11 @@ function email_user($userto, $userfrom, $subject, $messagetext, $messagehtml='',
$mail->Host = get_config('smtphosts');
if (get_config('smtpuser')) {
// Use SMTP authentication
$mail->SMTPAuth = true;
$mail->Username = get_config('smtpuser');
$mail->Password = get_config('smtppass');
$mail->SMTPAuth = true;
$mail->Username = get_config('smtpuser');
$mail->Password = get_config('smtppass');
$mail->SMTPSecure = get_config('smtpsecure');
$mail->Port = get_config('smtpport');
}
}
......
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