redisabling mail tracking
authork <k054>
Tue, 15 Mar 2016 17:41:14 +0000 (13:41 -0400)
committerMichael McMahon <michael@fsf.org>
Mon, 4 Mar 2024 20:03:29 +0000 (15:03 -0500)
api/v3/Mailing.php

index 24a3b1b9f4d7ed1a0ef63ecde3f48072e10a00f5..7b6b119696fa4a30704d605a3e1e0d62091b213f 100644 (file)
@@ -117,6 +117,24 @@ function _civicrm_api3_mailing_gettokens_spec(&$params) {
  *   Array of parameters determined by getfields.
  */
 function _civicrm_api3_mailing_create_spec(&$params) {
+  $params['created_id']['api.default'] = 'user_contact_id';
+
+  $params['override_verp']['api.default'] = !CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'track_civimail_replies');
+  $params['visibility']['api.default'] = 'Public Pages';
+  $params['dedupe_email']['api.default'] = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'dedupe_email_default');
+
+  $params['forward_replies']['api.default'] = FALSE;
+  $params['auto_responder']['api.default'] = FALSE;
+  $params['open_tracking']['api.default'] = FALSE;
+  $params['url_tracking']['api.default'] = FALSE;
+
+  $params['header_id']['api.default'] = CRM_Mailing_PseudoConstant::defaultComponent('Header', '');
+  $params['footer_id']['api.default'] = CRM_Mailing_PseudoConstant::defaultComponent('Footer', '');
+  $params['optout_id']['api.default'] = CRM_Mailing_PseudoConstant::defaultComponent('OptOut', '');
+  $params['reply_id']['api.default'] = CRM_Mailing_PseudoConstant::defaultComponent('Reply', '');
+  $params['resubscribe_id']['api.default'] = CRM_Mailing_PseudoConstant::defaultComponent('Resubscribe', '');
+  $params['unsubscribe_id']['api.default'] = CRM_Mailing_PseudoConstant::defaultComponent('Unsubscribe', '');
+  $params['mailing_type']['api.default'] = 'standalone';
   $defaultAddress = CRM_Core_BAO_Domain::getNameAndEmail(TRUE, TRUE);
   foreach ($defaultAddress as $value) {
     if (preg_match('/"(.*)" <(.*)>/', $value, $match)) {