'contactid' => $contactID,
'requiredTokens' => CRM_Utils_Token::getRequiredTokens(),
'enableReplyTo' => (int) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'replyTo'),
+ 'disableMandatoryTokensCheck' => (int) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'disable_mandatory_tokens_check'),
'fromAddress' => $fromAddress['values'],
'defaultTestEmail' => civicrm_api3('Contact', 'getvalue', array(
'id' => 'user_contact_id',
// ex: var msgs = findMissingTokens(mailing, 'body_html');
findMissingTokens: function(mailing, field) {
var missing = {};
- if (!_.isEmpty(mailing[field])) {
+ if (!_.isEmpty(mailing[field]) && !CRM.crmMailing.disableMandatoryTokensCheck) {
var body = '';
if (mailing.footer_id) {
var footer = _.where(CRM.crmMailing.headerfooterList, {id: mailing.footer_id});