You are here

function simplenews_delete_spool in Simplenews 7

Same name and namespace in other branches
  1. 7.2 includes/simplenews.mail.inc \simplenews_delete_spool()

Remove records from mail spool table according to the conditions.

Return value

Count deleted

Related topics

2 calls to simplenews_delete_spool()
simplenews_node_delete in ./simplenews.module
Implements hook_node_delete().
simplenews_unsubscribe_user in ./simplenews.module
Unsubscribe a user from a mailing list or send a confirmation mail.

File

includes/simplenews.mail.inc, line 558
Simplenews email send and spool handling

Code

function simplenews_delete_spool(array $conditions) {
  $query = db_delete('simplenews_mail_spool');
  foreach ($conditions as $condition => $value) {
    $query
      ->condition($condition, $value);
  }
  return $query
    ->execute();
}