function simplenews_rules_action_send in Simplenews 7
Same name and namespace in other branches
- 8.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_send()
- 8 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_send()
- 7.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_send()
- 3.x simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_send()
Action implementation, send a newsletter node.
File
- simplenews_rules/
simplenews_rules.rules.inc, line 191 - Rules hooks for the Simplenews newsletter module.
Code
function simplenews_rules_action_send($node) {
$newsletter = simplenews_newsletter_load($node->nid);
if ($newsletter && ($newsletter->status != SIMPLENEWS_STATUS_SEND_PENDING || $newsletter->status != SIMPLENEWS_STATUS_SEND_PENDING)) {
module_load_include('inc', 'simplenews', 'includes/simplenews.mail');
simplenews_add_node_to_spool($node);
}
}