Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17331

Mass SMSes are not being sent, even though "send schedules SMS"-job completes without errors

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      I've installed the extension for Twilio to send SMS'es, and it works fine when sending single SMS'es as an action, for example through the action button when viewing a contact.
      If I want to send Mass SMSes, though, it doesn't work. I can create and schedule the Mass SMS just fine, and the "Send scheduled SMS"-job finishes without error, but zero SMS'es are send (the job-log also reflects that).
      The cause of this is an error in the function create in CRM/Mailing/BAO/Mailing.php. On line 1755 getRecipients are called without the last argument $mode, and getRecipients are executed as if it's an email and not an SMS:

            // Populate the recipients.
            if (empty($params['_skip_evil_bao_auto_recipients_'])) {
              self::getRecipients($job->id, $mailing->id, NULL, NULL, TRUE, $mailing->dedupe_email);
            }
      

      Suggested solution:

            // Populate the recipients.
            if (empty($params['_skip_evil_bao_auto_recipients_'])) {
              // 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);
            }
      

      I've tested this on 4.6.8 and it works for me.
      See http://civicrm.stackexchange.com/questions/403/why-cant-i-send-bulk-sms-even-though-i-can-send-individually/6805#6805 for further info.

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              andersiversen Anders Iversen
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified