function simplenews_save_spool in Simplenews 6
Same name and namespace in other branches
- 6.2 includes/simplenews.mail.inc \simplenews_save_spool()
- 7.2 includes/simplenews.mail.inc \simplenews_save_spool()
- 7 includes/simplenews.mail.inc \simplenews_save_spool()
Save mail message in mail cache table.
Parameters
array $message data array to be stored: $message['mail'] $message['nid'] $message['vid'] $message['tid'] $message['status'] (Default: 1 = pending) $message['time'] (default: current unix timestamp)
array $message Mail message array:
1 call to simplenews_save_spool()
- simplenews_send_node in ./
simplenews.module - Send newsletter node to subcribers.
File
- ./
simplenews.module, line 1848 - Simplnews node handling, sent email, newsletter block and general hooks
Code
function simplenews_save_spool($message) {
$status = isset($message['status']) ? $message['status'] : SIMPLENEWS_SPOOL_PENDING;
$time = isset($message['time']) ? $message['time'] : time();
db_query("INSERT INTO {simplenews_mail_spool} (mail, nid, vid, tid, status, timestamp)\n VALUES ('%s', %d, %d, %d, %d, %d)", $message['mail'], $message['nid'], $message['vid'], $message['tid'], $status, $time);
}