In this chapter, we will create a module with an administration interface. The module we create will provide a way for administrators to send email messages to users—all from within the administration section of Drupal.
This chapter has another intent, though. We will use a couple new hooks, the Forms API, and some other Drupal functions and constructs. These APIs are selected in part because they have undergone significant revision since Drupal 5. Thus, if you are already acquainted with Drupal 5 programming, this chapter will help the transition to Drupal 6.
In the course of creating our email module, we will perform the following:
Take a closer look at
hook_menu()
, making use of access control settingsUse the Forms API to create a form and handle the form's lifecycle
Make use of Drupal's new mail subsystem and
hook_mail()
for sending messages to usersUse
hook_mail_alter()
to add system-wide information to outbound emailImplement
hook_user()
to add information...