Closed (fixed)
Project:
Account reminder
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Jun 2010 at 16:48 UTC
Updated:
9 Jun 2010 at 04:50 UTC
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
Comment #1
jaydub commentedFrom 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.
Comment #2
JimBroad commentedYes, I see. Just took a closer look at the drupal_mail() code. Thanks for clearing that up.
Comment #3
JimBroad commentedComment #4
JimBroad commented