Currently broadcast messages and reminders share the same mail tag, and don't include any contextual information, this means that modules can't implement hook_mail_alter effectively since they can't know which entity is being acted on or which type of message is being sent.
Adding a tag to the message will let module know which type of message is being sent, allowing them to conditionally alter the message, and adding entity information to the params variable will allow other modules to do things like include extra entity specific information in emails (such as attach files containing specific instructions).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | registration-add tags and contextual info to mails-2495421-1.diff | 2.01 KB | jmickela |
Issue fork registration-2495421
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
jmickelaComment #2
john.oltman commentedComment #5
john.oltman commentedContext already existed, and this fix adds tags. To use them, subscribe to the REGISTRATION_ALTER_MAIL event and place the desired info into the mail parameters using the event setData function. Then key off this info in a hook_mail_alter.
Comment #6
john.oltman commented