Drupal 7 Module Development Part 4 – Cron and sending email – Daily Dose of Drupal Episode 19

This continues on the module we started last time and shows how to implement hook_cron to run periodic tasks on your Drupal website. Also goes over hook_mail and the drupal_mail function for creating and sending email messages within your Drupal 7 module.

In this episode you will learn:

– How to implement hook_cron in a Drupal 7 module
– How to implement hook_mail to set up email messages in your Drupal 7 module
– How to trigger the sending of email in a Drupal 7 module with the drupal_mail function
– How to retrieve Drupal variables using the Drupal variable_get function

If you need to configure your development environment to send emails, this might help – http://codekarate.com/blog/sending-emails-your-ubuntu-drupal-development-environment-2-minutes

Post Author: hatefull