CRM-17331 - Mass SMSes are not being sent - fix for 4.6
authorDave Jenkins <davej+git@circle-interactive.co.uk>
Fri, 5 May 2017 16:19:07 +0000 (17:19 +0100)
committerDave Jenkins <davej+git@circle-interactive.co.uk>
Fri, 5 May 2017 16:19:07 +0000 (17:19 +0100)
CRM/Mailing/BAO/Mailing.php

index 18f1efeca5b5aa4d8dfe4228db5bae957d3f5f45..8ac533f5ff980a65b20b0b615db6c92df34186fe 100644 (file)
@@ -1753,7 +1753,9 @@ ORDER BY   civicrm_email.is_bulkmail DESC
 
       // Populate the recipients.
       if (empty($params['_skip_evil_bao_auto_recipients_'])) {
-        self::getRecipients($job->id, $mailing->id, NULL, NULL, TRUE, $mailing->dedupe_email);
+        // CRM-17331: check if it's an sms
+        $mode = $mailing->sms_provider_id ? 'sms' : NULL;
+        self::getRecipients($job->id, $mailing->id, NULL, NULL, TRUE, $mailing->dedupe_email, $mode);
       }
       // Schedule the job now that it has recipients.
       $job->scheduled_date = $params['scheduled_date'];