Allow token in fixed email field

Created on 18 August 2023, over 1 year ago
Updated 19 July 2024, 5 months ago

Problem/Motivation

I would like to use [site:email] as recipient address. This is currently not possible.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany anruether Bonn

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

Comments & Activities

  • Issue created by @anruether
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Seems reasonable and should be pretty easy to do, see \Drupal\workbench_email\Plugin\QueueWorker\WorkbenchEmailProcessor::processItem

    We already replace on body/subject/reply to. Would just be a matter of doing the same for the to address.

  • πŸ‡ΊπŸ‡ΈUnited States alex.verhoeven

    I really need this functionality as well. I have multiple editors who are assigned to content in an "assigned editor" field, and I currently have to create roles for each one in order to send email to the correct editor. Let me know if I can be of assistance with testing.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    @alex.verhoeven, there should be a user reference recipient plugin you can use instead

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • πŸ‡ΊπŸ‡ΈUnited States alex.verhoeven

    Ah! I didn't realize that adding a user entity reference field to the content type would add it to the available entity reference user fields in the "To" settings. This might be a workaround for me. My main hurdle is that I have thousands of imported nodes from the D7 site that have the assigned editor values as a text string. I will have to do some major bulk operations to move that over into an entity reference field. Being able to use the token would still be the ideal solution in my scenario. I'd be delighted to test a patch when one is available.

    Thanks so much for the info!

  • First commit to issue fork.
Production build 0.71.5 2024