You are here

function newsletter_node_insert in Newsletter 7

Same name and namespace in other branches
  1. 7.2 newsletter.module \newsletter_node_insert()

Implements hook_node_insert().

File

./newsletter.module, line 390
Defines menu items for newsletter administration, permissions and basic drupal hooks.

Code

function newsletter_node_insert($node) {
  $status = array();
  $custom_send_rate_lists = newsletter_custom_send_rate_lists();
  foreach ($custom_send_rate_lists as $list) {
    $newsletter = newsletter_create($list->nlid);
    if ($newsletter
      ->checkCustom()) {
      $status = array_merge($status, $newsletter
        ->send());
    }
  }
  newsletter_feedback($status);
}