Score:0

How can I print recipient mail address in webform email handler body with twig?

us flag

In the webform e-mail handler configuration I can see that webform twig variable is available. I looked to the context with xDebug and it looks like I should be able to print e-mail address of the recipient with in the mail body. But it doesn't work, the body is empty. Do you know why and how can I fix this?

{{ webform.handlers.e_mail.settings.to_mail }}

Edit: I also tried to use token like this:

{{ webform_token('[webform:handler:e_mail:settings:to_mail]', webform_submission, [], options) }}

,but the token didn't get replaced.

Score:1
us flag

The module maintainer says it's by design: https://www.drupal.org/project/webform/issues/3231110

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.