MDL-30960 messages: add option to set authtype

This commit is contained in:
Daniel Neis 2015-05-13 18:06:21 -03:00
parent 803f565753
commit 2108ac8a4f
3 changed files with 8 additions and 0 deletions

View file

@ -53,6 +53,10 @@ class moodle_phpmailer extends PHPMailer {
$this->Version = 'Moodle '.$CFG->version; // mailer version
$this->CharSet = 'UTF-8';
if (!empty($CFG->smtpauthtype)) {
$this->AuthType = $CFG->smtpauthtype;
}
// Some MTAs may do double conversion of LF if CRLF used, CRLF is required line ending in RFC 822bis.
if (isset($CFG->mailnewline) and $CFG->mailnewline == 'CRLF') {
$this->LE = "\r\n";