Hello!

I am in a situation where the mails to be sent need to be modified according to some custom node content (but it is still using the templates). To achieve that, I did like the flag_content module : the mail to be sent is retrived via a theming call. That way, others modules can override this call.

Please find attached a patch that implement this. There is no change of behavior for the commentmail module.

Cheers,
Nicolas

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maartenvg’s picture

That looks like a nice solution. I'll check it out and see if I can incorporate it into a release. For D6 you can change the mail I think with hook_mail_alter().