function simplenews_update_spool in Simplenews 7.2
Same name and namespace in other branches
- 6.2 includes/simplenews.mail.inc \simplenews_update_spool()
- 6 simplenews.module \simplenews_update_spool()
- 7 includes/simplenews.mail.inc \simplenews_update_spool()
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: An integer indicating the updated status. Must be one of:
- 0: hold
- 1: pending
- 2: send
- 3: in progress
- error: (optional) The error id. Defaults to 0 (no error).
Related topics
2 calls to simplenews_update_spool()
- simplenews_get_spool in includes/
simplenews.mail.inc - This function allocates messages to be sent in current run.
- simplenews_mail_spool in includes/
simplenews.mail.inc - Send simplenews newsletters from the spool.
File
- includes/
simplenews.mail.inc, line 480 - Simplenews email send and spool handling
Code
function simplenews_update_spool($msids, $data) {
db_update('simplenews_mail_spool')
->condition('msid', $msids)
->fields(array(
'status' => $data['status'],
'error' => isset($result['error']) ? (int) $data['error'] : 0,
'timestamp' => REQUEST_TIME,
))
->execute();
}