MDL-13239 improved smtp bulk setting based on feedback from Gary; merged from MOODLE_19_STABLE

This commit is contained in:
skodak
2008-02-02 16:22:47 +00:00
parent 907ba776f9
commit 3a6c690a86
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ $temp = new admin_settingpage('mail', get_string('mail','admin'));
$temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configpasswordunmask('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), ''));
$temp->add(new admin_setting_configtext('smtpmaxbulk', get_string('smtpmaxbulk', 'admin'), get_string('configsmtpmaxbulk', 'admin'), 0, PARAM_INT));
$temp->add(new admin_setting_configtext('smtpmaxbulk', get_string('smtpmaxbulk', 'admin'), get_string('configsmtpmaxbulk', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'admin'), get_string('confignoreplyaddress', 'admin'), 'noreply@' . $_SERVER['HTTP_HOST'], PARAM_NOTAGS));
$temp->add(new admin_setting_configselect('digestmailtime', get_string('digestmailtime', 'admin'), get_string('configdigestmailtime', 'admin'), 17, array('00' => '00',
'01' => '01',
+2 -2
View File
@@ -213,7 +213,7 @@ $string['configsitemailcharset'] = 'All the emails generated by your site will b
$string['configsitepolicy'] = 'If you have a site policy that all users must see and agree to before using this site, then specify the URL to it here, otherwise leave this field blank. The URL can point to anywhere - one convenient place would be a file in the site files. eg http://yoursite/file.php/1/policy.html';
$string['configslasharguments'] = 'Files (images, uploads etc) are provided via a script using \'slash arguments\'. This method allows files to be more easily cached in web browsers, proxy servers etc. Unfortunately, some PHP servers don\'t allow this method, so if you have trouble viewing uploaded files or images (eg user pictures), disable this setting.';
$string['configsmartpix'] = 'With this on, icons are served through a PHP script that searches the current theme, then all parent themes, then the Moodle /pix folder. This reduces the need to duplicate image files within themes, but has a slight performance cost.';
$string['configsmtpmaxbulk'] = 'Send multiple messages in one SMTP session, this may speed up sending of emails.';
$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['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\'). If you leave it blank, Moodle will use the PHP default method of sending mail.';
$string['configsmtpuser'] = 'If you have specified an SMTP server above, and the server requires authentication, then enter the username and password here.';
$string['configstartwday'] = 'Start of Week';
@@ -627,7 +627,7 @@ $string['sitesectionhelp'] = 'If selected, a topic section will be displayed on
$string['slasharguments'] = 'Use slash arguments';
$string['smartpix'] ='Smart pix search';
$string['smtphosts'] = 'SMTP hosts';
$string['smtpmaxbulk'] = 'SMTP bulk sending';
$string['smtpmaxbulk'] = 'SMTP session limit';
$string['smtppass'] = 'SMTP password';
$string['smtpuser'] = 'SMTP username';
$string['stats'] = 'Statistics';
+2 -2
View File
@@ -3799,7 +3799,7 @@ function &get_mailer($action='get') {
static $counter = 0;
if (!isset($CFG->smtpmaxbulk)) {
$CFG->smtpmaxbulk = 0;
$CFG->smtpmaxbulk = 1;
}
if ($action == 'get') {
@@ -3835,7 +3835,7 @@ function &get_mailer($action='get') {
include_once($CFG->libdir.'/phpmailer/class.phpmailer.php');
$mailer = new phpmailer();
$counter = 0;
$counter = 1;
$mailer->Version = 'Moodle '.$CFG->version; // mailer version
$mailer->PluginDir = $CFG->libdir.'/phpmailer/'; // plugin directory (eg smtp plugin)