Return MailingID rather than ['id'] as id may not always be supplied
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 30 Apr 2019 23:11:56 +0000 (09:11 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Tue, 30 Apr 2019 23:11:56 +0000 (09:11 +1000)
api/v3/Mailing.php

index 29d164ce1658561cd62d43118253ae5ccfee9483..aec00c43d0cd076583867ea5f1645d554d42c9ec 100644 (file)
@@ -592,7 +592,7 @@ function civicrm_api3_mailing_preview($params) {
   );
 
   return civicrm_api3_create_success([
-    'id' => $params['id'],
+    'id' => $mailingID,
     'contact_id' => $contactID,
     'subject' => $mime->headers()['Subject'],
     'body_html' => $mime->getHTMLBody(),