mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Merge branch 'MDL-30960_master' of https://github.com/danielneis/moodle
This commit is contained in:
commit
ca5c7d7535
@ -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";
|
||||
|
@ -30,6 +30,7 @@ $string['configmailnewline'] = 'Newline characters used in mail messages. CRLF i
|
||||
$string['confignoreplyaddress'] = 'Emails are sometimes sent out on behalf of a user (eg forum posts). The email address you specify here will be used as the "From" address in those cases when the recipients should not be able to reply directly to the user (eg when a user chooses to keep their address private).';
|
||||
$string['configemailonlyfromnoreplyaddress'] = 'If enabled, all email will be sent using the no-reply address as the "from" address. This can be used to stop anti-spoofing controls in external mail systems blocking emails.';
|
||||
$string['configsitemailcharset'] = 'This setting specifies the default charset for all emails sent from the site.';
|
||||
$string['configsmtpauthtype'] = 'This sets the authentication type to use on smtp server.';
|
||||
$string['configsmtphosts'] = 'Give the full name of one or more local SMTP servers that Moodle should use to send mail (eg \'mail.a.com\' or \'mail.a.com;mail.b.com\'). To specify a non-default port (i.e other than port 25), you can use the [server]:[port] syntax (eg \'mail.a.com:587\'). For secure connections, port 465 is usually used with SSL, port 587 is usually used with TLS, specify security protocol below if required. If you leave this field blank, Moodle will use the PHP default method of sending mail.';
|
||||
$string['configsmtpmaxbulk'] = 'Maximum number of messages sent per SMTP session. Grouping messages may speed up the sending of emails. Values lower than 2 force creation of new SMTP session for each email.';
|
||||
$string['configsmtpsecure'] = 'If SMTP server requires secure connection, specify the correct protocol type.';
|
||||
@ -42,6 +43,7 @@ $string['none'] = 'None';
|
||||
$string['noreplyaddress'] = 'No-reply address';
|
||||
$string['pluginname'] = 'Email';
|
||||
$string['sitemailcharset'] = 'Character set';
|
||||
$string['smtpauthtype'] = 'SMTP Auth Type';
|
||||
$string['smtphosts'] = 'SMTP hosts';
|
||||
$string['smtpmaxbulk'] = 'SMTP session limit';
|
||||
$string['smtppass'] = 'SMTP password';
|
||||
|
@ -28,6 +28,8 @@ if ($ADMIN->fulltree) {
|
||||
$settings->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'message_email'), get_string('configsmtphosts', 'message_email'), '', PARAM_RAW));
|
||||
$options = array('' => get_string('none', 'message_email'), 'ssl' => 'SSL', 'tls' => 'TLS');
|
||||
$settings->add(new admin_setting_configselect('smtpsecure', get_string('smtpsecure', 'message_email'), get_string('configsmtpsecure', 'message_email'), '', $options));
|
||||
$authtypeoptions = array('LOGIN' => 'LOGIN', 'PLAIN' => 'PLAIN', 'NTLM' => 'NTLM', 'CRAM-MD5' => 'CRAM-MD5');
|
||||
$settings->add(new admin_setting_configselect('smtpauthtype', get_string('smtpauthtype', 'message_email'), get_string('configsmtpauthtype', 'message_email'), 'LOGIN', $authtypeoptions));
|
||||
$settings->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'message_email'), get_string('configsmtpuser', 'message_email'), '', PARAM_NOTAGS));
|
||||
$settings->add(new admin_setting_configpasswordunmask('smtppass', get_string('smtppass', 'message_email'), get_string('configsmtpuser', 'message_email'), ''));
|
||||
$settings->add(new admin_setting_configtext('smtpmaxbulk', get_string('smtpmaxbulk', 'message_email'), get_string('configsmtpmaxbulk', 'message_email'), 1, PARAM_INT));
|
||||
|
Loading…
x
Reference in New Issue
Block a user