You are here

function newsletter_queue_custom_newsletter in Newsletter 7

Queues a custom newsletter for cron run.

Parameters

$subscribers: An array containing the subscribers this newsletter must be delivered.

$ntid: The id of the newsletter template to be used.

$nnid: The id of the newsletter.

2 calls to newsletter_queue_custom_newsletter()
newsletter_create_send_form_page_two_submit in includes/newsletter.admin.inc
newsletter_send_draft in includes/newsletter.admin.inc
Send a custom newsletter draft.

File

includes/newsletter.admin.inc, line 1559
Admin page callbacks for the newsletter module.

Code

function newsletter_queue_custom_newsletter($subscribers, $newsletter) {
  $custom_queue = variable_get('newsletter_custom_for_next_cron', array());
  $custom_queue[] = array(
    'subscribers' => $subscribers,
    'ntid' => $newsletter->ntid,
    'nnid' => $newsletter->nnid,
  );
  variable_set('newsletter_custom_for_next_cron', $custom_queue);
  drupal_set_message(t('Newsletter queued for the next cron run'));
}