Score:0

Load original email content via hook_mail_alter()

mw flag

I'm hooking into hook_mail_alter() to make an amendment to outgoing emails before they go, but by the time they are loaded by hook_mail_alter(), any token has already been replaced.

Is it possible to use any of the information from the email to retrieve the original "tokenized" version so that I can pass those separately?

cn flag
By "original" content, you mean "the raw value before any token replacement has occurred"?
Jaypan avatar
de flag
How is the email being generated? What triggers it?
Andrew Morris avatar
mw flag
@PatrickKenny, yes basically
Andrew Morris avatar
mw flag
@Jaypan, unfortunately, I'm trying to make a catchment for potentially any module that could, that's why at the moment I'm using `hook_mail_alter` instead of trying to track down a possible function that initiates it. The reason is that I am trying to build a module that could be used by any number of our sites, and could have multiple different methods to send emails, so I'm trying to see if I can make a catch-all
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.