How quickly send a mail with a Drupal module ?

You made a PHP script associated to a Drupal module and you want to be alerted of custom special events or big fails

In your module file, just implement the hook_mail() like this :

Now you can send what you want from your script

By the way, I had so much template problems with this function that I finally used the default PHP mail() function:

 

Leave a Reply

Your email address will not be published.

Post Navigation