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

oadaeh’s picture

Category: bug » support
Status: Active » Closed (works as designed)

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

mtndan’s picture

Ok, so then the core triggers and actions modules are not doing token replacement correctly?

oadaeh’s picture

I don't know, as I don't use them.

jairgee’s picture

Version: 6.x-1.0-beta3 » 6.x-1.0-beta4
Category: support » bug
Status: Closed (works as designed) » Needs review

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

Simon Georges’s picture

Status: Needs review » Active

There currently is no patch, so setting status to "active".

franz’s picture

jairgee, 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.

wundo’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Closing very old (dead) issues, if you think this is still relevant please re-open.