From 72decf50c3bcf8a21ce204b865a262909292a3d7 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Mon, 6 Jan 2014 16:32:27 -0500 Subject: [PATCH] CRM-14049 allow on-hold email when retrieving details and pass contactId if exists --- CRM/Mailing/Page/View.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CRM/Mailing/Page/View.php b/CRM/Mailing/Page/View.php index 3581427a06..42cb594f20 100644 --- a/CRM/Mailing/Page/View.php +++ b/CRM/Mailing/Page/View.php @@ -117,19 +117,21 @@ class CRM_Mailing_Page_View extends CRM_Core_Page { if (isset($this->_contactID)) { //get details of contact with token value including Custom Field Token Values.CRM-3734 $returnProperties = $this->_mailing->getReturnProperties(); - $params = array('contact_id' => $this->_contactID); - $details = CRM_Utils_Token::getTokenDetails($params, + $params = array('contact_id' => $this->_contactID); + $details = CRM_Utils_Token::getTokenDetails($params, $returnProperties, - TRUE, TRUE, NULL, + FALSE, TRUE, NULL, $this->_mailing->getFlattenedTokens(), get_class($this) ); $details = $details[0][$this->_contactID]; + $contactId = $this->_contactID; } else { $details = array('test'); + $contactId = 0; } - $mime = &$this->_mailing->compose(NULL, NULL, NULL, 0, + $mime = &$this->_mailing->compose(NULL, NULL, NULL, $contactId, $this->_mailing->from_email, $this->_mailing->from_email, TRUE, $details, $attachments -- 2.25.1