From 7a9646c14f0922d1136a7d99ac44de4230e7db64 Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Fri, 26 Dec 2014 11:12:32 +0530 Subject: [PATCH] CRM-15718 - Bulk sms: Check for do not send sms instead of is opt out https://issues.civicrm.org/jira/browse/CRM-15718 --- CRM/Mailing/BAO/MailingJob.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Mailing/BAO/MailingJob.php b/CRM/Mailing/BAO/MailingJob.php index 3c7fb2b9c9..3b25917a93 100644 --- a/CRM/Mailing/BAO/MailingJob.php +++ b/CRM/Mailing/BAO/MailingJob.php @@ -539,7 +539,8 @@ VALUES (%1, %2, %3, %4, %5, %6, %7) WHERE $eqTable.job_id = " . $this->id . " AND $edTable.id IS null AND $ebTable.id IS null - AND $contactTable.is_opt_out = 0"; + AND ( $contactTable.is_opt_out = 0 + OR $contactTable.do_not_sms = 0 )"; } $eq->query($query); @@ -634,7 +635,7 @@ 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 -- 2.25.1