| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
if (CRM_Mailing_Info::workflowEnabled()) {
if (!CRM_Core_Permission::check('create mailings')) {
throw new \Civi\API\Exception\UnauthorizedException("This system uses advanced CiviMail workflows which require additional permissions");
if (CRM_Mailing_Info::workflowEnabled()) {
if (!CRM_Core_Permission::check('create mailings')) {
throw new \Civi\API\Exception\UnauthorizedException("This system uses advanced CiviMail workflows which require additional permissions");
function civicrm_api3_mailing_get_token($params) {
if (!array_key_exists("usage", $params)) {
throw new API_Exception('Mandatory keys missing from params array: entity');
function civicrm_api3_mailing_get_token($params) {
if (!array_key_exists("usage", $params)) {
throw new API_Exception('Mandatory keys missing from params array: entity');
function _civicrm_api3_mailing_submit_spec(&$spec) {
$mailingFields = CRM_Mailing_DAO_Mailing::fields();
$spec['id'] = $mailingFields['id'];
function _civicrm_api3_mailing_submit_spec(&$spec) {
$mailingFields = CRM_Mailing_DAO_Mailing::fields();
$spec['id'] = $mailingFields['id'];
*/
function _civicrm_api3_mailing_deprecation() {
return array('event_confirm' => 'Mailing api "event_confirm" action is deprecated. Use the mailing_event_confirm api instead.');
*/
function _civicrm_api3_mailing_deprecation() {
return array('event_confirm' => 'Mailing api "event_confirm" action is deprecated. Use the mailing_event_confirm api instead.');
function civicrm_api3_mailing_preview($params) {
civicrm_api3_verify_mandatory($params,
'CRM_Mailing_DAO_Mailing',
function civicrm_api3_mailing_preview($params) {
civicrm_api3_verify_mandatory($params,
'CRM_Mailing_DAO_Mailing',
function _civicrm_api3_mailing_send_test_spec(&$spec) {
$spec['test_group']['title'] = 'Test Group ID';
$spec['test_email']['title'] = 'Test Email Address';
}
function _civicrm_api3_mailing_send_test_spec(&$spec) {
$spec['test_group']['title'] = 'Test Group ID';
$spec['test_email']['title'] = 'Test Email Address';
}
function civicrm_api3_mailing_send_test($params) {
if (!array_key_exists('test_group', $params) && !array_key_exists('test_email', $params)) {
throw new API_Exception("Mandatory key(s) missing from params array: test_group and/or test_email field are required");
function civicrm_api3_mailing_send_test($params) {
if (!array_key_exists('test_group', $params) && !array_key_exists('test_email', $params)) {
throw new API_Exception("Mandatory key(s) missing from params array: test_group and/or test_email field are required");
function civicrm_api3_mailing_stats($params) {
civicrm_api3_verify_mandatory($params,
'CRM_Mailing_DAO_MailingJob',
function civicrm_api3_mailing_stats($params) {
civicrm_api3_verify_mandatory($params,
'CRM_Mailing_DAO_MailingJob',
- $detail => CRM_Mailing_Event_BAO_Delivered::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
+ $detail => CRM_Mailing_Event_BAO_Delivered::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
- $detail => CRM_Mailing_Event_BAO_Bounce::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
+ $detail => CRM_Mailing_Event_BAO_Bounce::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
- $detail => CRM_Mailing_Event_BAO_Unsubscribe::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']),
+ $detail => CRM_Mailing_Event_BAO_Unsubscribe::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']),
- $detail => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']),
+ $detail => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']),
- $detail => CRM_Mailing_Event_BAO_Opened::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
+ $detail => CRM_Mailing_Event_BAO_Opened::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
* Fix the reset dates on the email record based on when a mail was last delivered
* We only consider mailings that were completed and finished in the last 3 to 7 days
* Both the min and max days can be set via the params
* Fix the reset dates on the email record based on when a mail was last delivered
* We only consider mailings that were completed and finished in the last 3 to 7 days
* Both the min and max days can be set via the params
*/
function civicrm_api3_mailing_update_email_resetdate($params) {
CRM_Mailing_Event_BAO_Delivered::updateEmailResetDate(
*/
function civicrm_api3_mailing_update_email_resetdate($params) {
CRM_Mailing_Event_BAO_Delivered::updateEmailResetDate(