Merge branch 'MDL-22510-master' of git://github.com/ankitagarwal/moodle
[moodle.git] / lib / moodlelib.php
index d6b9fde..fe642a9 100644 (file)
@@ -5030,6 +5030,7 @@ function get_mailer($action='get') {
                 $mailer->SMTPDebug = true;
             }
             $mailer->Host          = $CFG->smtphosts;        // specify main and backup servers
+            $mailer->SMTPSecure    = $CFG->smtpsecure;       // specify secure connection protocol
             $mailer->SMTPKeepAlive = $prevkeepalive;         // use previous keepalive
 
             if ($CFG->smtpuser) {                            // Use SMTP authentication