I want to send an email to a configurable address when an event node is added.. Obviously, I don't want to maintain a patch for node. The Notify module can send an email when a node is added, but can't filter by type - and is a lot more than what I need anyway.

Is the correct/best practice to just write a tiny little module that uses hook_cron to check for new events, and fire off an email if so, or am I missing something obvious?

tia,
drue

Comments

papile’s picture

Hows about firing off the email the moment the event is posted

make a module and have mymodule_nodeapi called

Then in the switch statement, for insert put
case insert:
if($node->type == 'event')
fire off email
break;

nodeapi is very useful. http://api.drupal.org/api/5/function/hook_nodeapi It will act whenever anything is submitted. But your if statement with $node->type set can filter it.

drue’s picture

Awesome - I knew there was a better way! Thanks!

--drue