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).

Command icon 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

jmickela’s picture

john.oltman’s picture

Version: 7.x-1.x-dev » 3.0.x-dev
Assigned: Unassigned » john.oltman

  • john.oltman committed 7d2faddb on 3.0.x
    Issue #2495421: Mail should have context and tags for different emails
    
john.oltman’s picture

Status: Active » Fixed

Context 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.

john.oltman’s picture

Title: Mails should have contextual information and different tags for different mails. » Mails should have contextual information and different tags for different mails
Assigned: john.oltman » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.