From 67987886bcb115283671b675a3b6d901cb00814f Mon Sep 17 00:00:00 2001 From: Siddhant Rajagopalan Date: Sat, 9 Aug 2014 10:17:43 +0530 Subject: [PATCH] changed apis --- api/v3/Mailing.php | 3 ++- api/v3/MailingRecipients.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 553a86bce6..a294ac0f44 100644 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -331,8 +331,9 @@ function civicrm_api3_mailing_preview($params) { $mime = &$mailing->compose(NULL, NULL, NULL, $session->get('userID'), $fromEmail, $fromEmail, TRUE, $details[0][$session->get('userID')], $attachments ); - return array('html' => $mime->getHTMLBody(), 'text' => $mime->getTXTBody()); + return civicrm_api3_create_success(array('html' => $mime->getHTMLBody(), 'text' => $mime->getTXTBody())); } + 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" ); diff --git a/api/v3/MailingRecipients.php b/api/v3/MailingRecipients.php index 2cf2d2ff0a..2cdc4a6611 100644 --- a/api/v3/MailingRecipients.php +++ b/api/v3/MailingRecipients.php @@ -56,3 +56,5 @@ function civicrm_api3_mailing_recipients_get($params, $ids = array()) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } + + -- 2.25.1