public function SpoolStorage::updateMails in Simplenews 8
Same name and namespace in other branches
- 8.2 src/Spool/SpoolStorage.php \Drupal\simplenews\Spool\SpoolStorage::updateMails()
- 3.x src/Spool/SpoolStorage.php \Drupal\simplenews\Spool\SpoolStorage::updateMails()
Update status of mail data in spool table.
Time stamp is set to current time.
Parameters
array $msids: Array of Mail spool ids to be updated
array $data: Array containing email sent results, with the following keys:
- status: Any of the status constants.
- error: (optional) The error id. Defaults to 0 (no error).
Overrides SpoolStorageInterface::updateMails
1 call to SpoolStorage::updateMails()
- SpoolStorage::getMails in src/
Spool/ SpoolStorage.php - This function allocates mails to be sent in current run.
File
- src/
Spool/ SpoolStorage.php, line 138
Class
- SpoolStorage
- Default database spool storage.
Namespace
Drupal\simplenews\SpoolCode
public function updateMails($msids, array $data) {
$this->connection
->update('simplenews_mail_spool')
->condition('msid', (array) $msids, 'IN')
->fields(array(
'status' => $data['status'],
'error' => isset($data['error']) ? (int) $data['error'] : 0,
'timestamp' => REQUEST_TIME,
))
->execute();
}