*/
class CRM_Admin_Form_Setting_Mail extends CRM_Admin_Form_Setting {
+ protected $_settings = array(
+ 'replyTo' => CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
+ );
+
/**
* Build the form object.
*
$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('advcheckbox', 'replyTo', ts('Enable Custom Reply-To'));
$this->addElement('text', 'mailerJobsMax', ts('Mailer CRON job limit'));
$check = TRUE;
);
//Added code to add custom field as Reply-To on form when it is enabled from Mailer settings
- if (isset($config->replyTo) && !empty($config->replyTo) && empty($options['override_verp'])) {
+ if ((int) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'replyTo') && empty($options['override_verp'])) {
$this->add('select', 'reply_to_address', ts('Reply-To'),
array('' => '- select -') + $fromEmailAddress
);
'mailTokens' => $mailTokens['values'],
'contactid' => $contactID,
'requiredTokens' => CRM_Utils_Token::getRequiredTokens(),
- 'enableReplyTo' => isset($config->replyTo) ? $config->replyTo : 0,
+ 'enableReplyTo' => (int) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'replyTo'),
'fromAddress' => array_values($fromAddress['values'][0]['api.OptionValue.get']['values']),
'defaultTestEmail' => civicrm_api3('Contact', 'getvalue', array(
'id' => 'user_contact_id',
'description' => NULL,
'help_text' => NULL,
),
+ 'replyTo' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'replyTo',
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'default' => 0,
+ 'add' => '4.6',
+ 'title' => 'Enable Custom Reply-To',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Allow CiviMail users to send mailings with a custom Reply-To header',
+ 'help_text' => NULL,
+ ),
'mailing_backend' => array(
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
</tr>
<tr class="crm-mail-form-block-replyTo">
<td class="label">{$form.replyTo.label}</td><td>{$form.replyTo.html}<br />
- <span class="description">{ts}Check to enable Reply To functionality for CiviMail.{/ts}</span></td>
+ <span class="description">{ts}Allow CiviMail users to send mailings with a custom Reply-To header.{/ts}</span></td>
</tr>
</table>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>