From e36508bf62498b4e50e45b87e1610044ccce9516 Mon Sep 17 00:00:00 2001 From: Jaap Jansma Date: Tue, 9 Dec 2014 12:15:44 +0100 Subject: [PATCH] fix for issue CRM-15702 sending bulk smses to contacts without e-mail address --- CRM/Mailing/BAO/MailingJob.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CRM/Mailing/BAO/MailingJob.php b/CRM/Mailing/BAO/MailingJob.php index 09ba631d58..216b6a1355 100644 --- a/CRM/Mailing/BAO/MailingJob.php +++ b/CRM/Mailing/BAO/MailingJob.php @@ -598,6 +598,15 @@ VALUES (%1, %2, %3, %4, %5, %6, %7) $returnProperties = $mailing->getReturnProperties(); $params = $targetParams = $deliveredParams = array(); $count = 0; + + /** + * CRM-15702: Sending bulk sms to contacts without e-mail addres fails. + * Solution is to skip checking for on hold + */ + $skipOnHold = true; //do include a statement to check wether e-mail address is on hold + if ($mailing->sms_provider_id) { + $skipOnHold = false; //do not include a statement to check wether e-mail address is on hold + } foreach ($fields as $key => $field) { $params[] = $field['contact_id']; @@ -606,7 +615,7 @@ VALUES (%1, %2, %3, %4, %5, %6, %7) $details = CRM_Utils_Token::getTokenDetails( $params, $returnProperties, - TRUE, TRUE, NULL, + $skipOnHold, TRUE, NULL, $mailing->getFlattenedTokens(), get_class($this), $this->id -- 2.25.1