protected $_settings = array(
'replyTo' => CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
+ 'mailerBatchLimit' => CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
+ 'mailerJobSize' => CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
+ 'mailerJobsMax' => CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
+ 'mailThrottleTime' => CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
+ 'verpSeparator' => CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
);
/**
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - CiviMail'));
- $this->addElement('text', 'verpSeparator', ts('VERP Separator'));
- $this->addElement('text', 'mailerBatchLimit', ts('Mailer Batch Limit'));
- $this->addElement('text', 'mailThrottleTime', ts('Mailer Throttle Time'));
- $this->addElement('text', 'mailerJobSize', ts('Mailer Job Size'));
- $this->addElement('text', 'mailerJobsMax', ts('Mailer CRON job limit'));
$check = TRUE;
// redirect to Administer Section After hitting either Save or Cancel button.
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
$this->addFormRule(array('CRM_Admin_Form_Setting_Mail', 'formRule'));
- $this->addRule('mailerBatchLimit', ts('Please enter a valid integer.'), 'integer');
- $this->addRule('mailThrottleTime', ts('Please enter a valid integer.'), 'integer');
- $this->addRule('mailerJobSize', ts('Please enter a valid integer.'), 'integer');
- $this->addRule('mailerJobsMax', ts('Please enter a valid integer.'), 'integer');
parent::buildQuickForm($check);
}
const OUTBOUND_OPTION_MOCK = 4; // seems to be the same as 2, but also calls Mail's pre/post hooks? - see packages/Mail
const OUTBOUND_OPTION_REDIRECT_TO_DB = 5;
- /**
- * What should be the verp separator we use.
- *
- * @var char
- */
- public $verpSeparator = '.';
-
- /**
- * How long should we wait before checking for new outgoing mailings?
- *
- * @var int
- */
- public $mailerPeriod = 180;
-
- /**
- * TODO
- *
- * @var int
- */
- public $mailerSpoolLimit = 0;
-
- /**
- * How many emails should CiviMail deliver on a given run
- *
- * @var int
- */
- public $mailerBatchLimit = 0;
-
- /**
- * How large should each mail thread be
- *
- * @var int
- */
- public $mailerJobSize = 0;
-
- /**
- * How many parallel delivery cron jobs should we run
- *
- * @var int
- */
- public $mailerJobsMax = 0;
-
- /**
- * Should we sleep after sending an email?
- * Setting this to 0 means no sleep
- *
- * @var int
- */
- public $mailThrottleTime = 0;
-
}
'description' => '',
'help_text' => NULL,
),
+ 'mailerBatchLimit' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'mailerBatchLimit',
+ 'type' => 'Integer',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => array(
+ 'size' => 4,
+ 'maxlength' => 8,
+ ),
+ 'default' => 0,
+ 'add' => '4.7',
+ 'title' => 'Mailer Batch Limit',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Throttle email delivery by setting the maximum number of emails sent during each CiviMail run (0 = unlimited).',
+ 'help_text' => NULL,
+ 'prefetch' => 1,
+ ),
+ 'mailerJobSize' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'mailerJobSize',
+ 'type' => 'Integer',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => array(
+ 'size' => 4,
+ 'maxlength' => 8,
+ ),
+ 'default' => 0,
+ 'add' => '4.7',
+ 'title' => 'Mailer Job Size',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'If you want to utilize multi-threading enter the size you want your sub jobs to be split into. Recommended values are between 1,000 and 10,000. Use a lower value if your server has multiple cron jobs running simultaneously, but do not use values smaller than 1,000. Enter "0" to disable multi-threading and process mail as one single job - batch limits still apply.',
+ 'help_text' => NULL,
+ 'prefetch' => 1,
+ ),
+ 'mailerJobsMax' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'mailerJobsMax',
+ 'type' => 'Integer',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => array(
+ 'size' => 4,
+ 'maxlength' => 8,
+ ),
+ 'default' => 0,
+ 'add' => '4.7',
+ 'title' => 'Mailer Cron Job Limit',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'The maximum number of mailer delivery jobs executing simultaneously (0 = allow as many processes to execute as started by cron)',
+ 'help_text' => NULL,
+ 'prefetch' => 1,
+ ),
+ 'mailThrottleTime' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'mailThrottleTime',
+ 'type' => 'Integer',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => array(
+ 'size' => 4,
+ 'maxlength' => 8,
+ ),
+ 'default' => 0,
+ 'add' => '4.7',
+ 'title' => 'Mailer Throttle Time',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'The time to sleep in between each e-mail in micro seconds. Setting this above 0 allows you to control the rate at which e-mail messages are sent to the mail server, avoiding filling up the mail queue very quickly. Set to 0 to disable.',
+ 'help_text' => NULL,
+ 'prefetch' => 1,
+ ),
+ 'verpSeparator' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'verpSeparator',
+ 'type' => 'String',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => array(
+ 'size' => 4,
+ 'maxlength' => 32,
+ ),
+ 'default' => '.',
+ 'add' => '4.7',
+ 'title' => 'VERP Separator',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Separator character used when CiviMail generates VERP (variable envelope return path) Mail-From addresses.',
+ 'help_text' => NULL,
+ 'prefetch' => 1,
+ ),
);