Recipient email address tokens

Created on 25 October 2023, about 1 year ago
Updated 29 June 2024, 6 months ago

Problem/Motivation

When I use the action send HTML email I am struggling to use tokens that are held in fields.

I am holding the email recipients in a plain text field of a node, the field does have a valid email address eg x@x.com but the validation in eca won't let me save and gives the error message action "Send HTML email" (): Enter a valid email address or use a token email address such as [node:author:mail]

I have tried setting a token [mail] with the [field_email_address:value] but it won't accept that the token has got a valid email address in it. This token does work inside the Message field and renders correctly but isn't accepted in the Recipient email address field

I can use this in send mail action but not send html email

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

[many thanks for any suggestions, and thank you Jurgen (et al) again for all your incredible work - through this module d9 is nearly (but not quite) as useful and powerful for me as d7 was - very grateful]

💬 Support request
Status

Closed: outdated

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom cjd4001

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cjd4001
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Not sure, which action you're actually using. There is Send email from Drupal core, which has a validation for the email field which expects :mail to be contained in the token name, which is what you can see as a description below the field. So, the token [user:mail] would work, but [mail] doesn't. This is a constraint that is built into the Drupal core action, which ECA can't change.

    However, that action doesn't allow you to send HTML emails. Only plain text emails can be sent with that.

    As you're saying that you send HTML mails, I wonder which action you're using and if that has the same field description ans validation as that from core.

  • Status changed to Postponed: needs info 12 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    What's the status on this?

  • Status changed to Closed: outdated 9 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • 🇧🇩Bangladesh shafiqhossain

    I am receiving the same error message like this

    action "Send HTML email" (Send HTML Email to Guest): Enter a valid email address or use a token email address such as [node:author:mail].

    I used a field value token ([node:field_guest_email:value]) for mail, but its not accepting it while saving, showing that error.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Can you answer my questions from comment #2 please? I have no idea where this action plugin in coming from.

Production build 0.71.5 2024