Closed (duplicate)
Project:
Mail System
Version:
6.x-1.9
Component:
Module compatibility
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2011 at 07:01 UTC
Updated:
4 Sep 2011 at 01:29 UTC
Hi,
I would suggest to put a higher module weight to mailsystem (weight > 128) because otherwise hook_mail_alter of other modules might get called after hook_mail_alter of mailsystem.
In my setup (mailsystem + html mail + mail mime) the current module weight of 0 has the following effect: The HTMLification of my mails is done before my custom modules can alter mails with hook_mail_alter, so the HTML mails which are sent out are the unaltered versions of the mails.
Comments
Comment #1
pillarsdotnet commentedWhat are these other modules?
Comment #2
tobi20 commentedThese are custom modules programmed by myself.
Nonetheless, I think this is really common: Say, you want to have a footer on all your mails. Then you will typically create a module which implements mail_alter. This module should be called as late as possible so that the footer is attached to the outgoing mails at the very end.
But the HTMLification of the mails (through mailsystem) should be done after the footer has been attached.
Comment #3
pillarsdotnet commentedI am going to write a module that provides an administrative user-interface to re-order all module weights.
Comment #4
john.oltman commentedpillars, you may want to look at the Util module for module weights - it does that already (among other things) and they are working on a D7 port:
http://drupal.org/project/util
Comment #5
pillarsdotnet commentedThanks. Marking this as a duplicate of #1237924-3: Increase module weight to run format() function after all hook_mail_alter