Looks like it should check for $key == 'account_reminder_email', rather than act on all outgoing mail as I assume it does now. See: http://api.drupal.org/api/function/email_example_mail/6

I'll be happy to patch provide a patch if this is the case...

Comments

jaydub’s picture

From the API page: "Note that hook_mail() is not actually a hook. It is only called for a single module, the module named in the first argument of drupal_mail(). So it's a callback of a type, but not a hook."

So in reality no the key doesn't need to be checked. The key would be used when a module defines and sends multiple emails in which case using the key would allow for logic in hook_mail to be specific to the email being sent.

JimBroad’s picture

Yes, I see. Just took a closer look at the drupal_mail() code. Thanks for clearing that up.

JimBroad’s picture

Status: Active » Closed (works as designed)
JimBroad’s picture

Status: Closed (works as designed) » Closed (fixed)