Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi folks,
It appears that this module doesn't support email tokens.
I'm using actions/triggers and created an advanced action to send an email. For the email "to" I used the "%auther" token. In the email body I used "%url". Neither seems to work.
Ideas?
Thanks in advance.
Comments
Comment #1
oadaeh CreditAttribution: oadaeh commentedIt is not the purpose of this module to convert tokens, but to provide an alternate method of sending e-mail, other than the default PHP method. The tokens should be converted by the module with which you used to create the message.
Comment #2
mtndan CreditAttribution: mtndan commentedOk, so then the core triggers and actions modules are not doing token replacement correctly?
Comment #3
oadaeh CreditAttribution: oadaeh commentedI don't know, as I don't use them.
Comment #4
jairgee CreditAttribution: jairgee commentedI am having the same problem, and would appreciate someone looking into it. I can't believe that it is a problem with the core Drupal system. The tokens that are described in the Action configuration are passed directly through (i.e., the e-mail that is sent includes the token variable names in the body of the e-mail, exactly as they are written).
I am not a programmer in any sense, but I am somewhat tech savvy. My first thought is that the contents of the Subject and Body are passed into/through the SMTP module as strings/literals, rather than being (pre)processed for tokens.
If anyone has any input on why this could be happening, or how to work around it, I would be greatly appreciative.
Comment #5
Simon Georges CreditAttribution: Simon Georges commentedThere currently is no patch, so setting status to "active".
Comment #6
franzjairgee, that's very unlikely. The SMTP module only inserts itself on the process of sending (drupal_mail_wrapper). The "tokenization" happens inside hook_mail implementations (you can read about it on the Drupal API). By the way, one of the tokens on the issue description is misspelled.
Comment #7
wundo CreditAttribution: wundo at Chuva Inc. commentedClosing very old (dead) issues, if you think this is still relevant please re-open.