From fad7b1050ca136ab41d1325f263f11c57d299512 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 24 Nov 2017 17:23:48 -0800 Subject: [PATCH] CRM-21472 - Allow FlexMailer to overload checkSendable() - Comments --- api/v3/Mailing.php | 1 + 1 file changed, 1 insertion(+) diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 903cd80f7d..300ac3b07c 100644 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -75,6 +75,7 @@ function civicrm_api3_mailing_create($params) { throw new API_Exception("Mailing has not been saved, Content maybe out of date, please refresh the page and try again"); } + // FlexMailer is a refactoring of CiviMail which provides new hooks/APIs/docs. If the sysadmin has opted to enable it, then use that instead of CiviMail. $safeParams['_evil_bao_validator_'] = \CRM_Utils_Constant::value('CIVICRM_FLEXMAILER_HACK_SENDABLE', 'CRM_Mailing_BAO_Mailing::checkSendable'); $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $safeParams); return _civicrm_api3_mailing_get_formatResult($result); -- 2.25.1