CONST MAX_CONTACTS_TO_PROCESS = 1000;
/**
- * class constructor
+ * Class constructor
*/
function __construct() {
parent::__construct();
/**
* Initiate all pending/ready jobs
*
- * @param null $testParams
+ * @param array $testParams
* @param null $mode
*
* @return void
}
/**
- * @param null $testParams
+ * @param array $testParams
*/
public function queue($testParams = NULL) {
$mailing = new CRM_Mailing_BAO_Mailing();
*
* @param object $mailer A Mail object to send the messages
*
- * @param null $testParams
+ * @param array $testParams
*
* @return void
* @access public
$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'];
$details = CRM_Utils_Token::getTokenDetails(
$params,
$returnProperties,
- TRUE, TRUE, NULL,
+ $skipOnHold, TRUE, NULL,
$mailing->getFlattenedTokens(),
get_class($this),
$this->id
}
/**
- * cancel a mailing
+ * Cancel a mailing
*
* @param int $mailingId the id of the mailing to be canceled
* @static
}
/**
- * @param $deliveredParams
- * @param $targetParams
+ * @param array $deliveredParams
+ * @param array $targetParams
* @param $mailing
* @param $job_date
*