How to add recipients?

Created on 27 October 2022, over 2 years ago
Updated 3 February 2025, about 21 hours ago

Hello,

sorry, I don't get it.
I have two webforms. The first one is for the users, they can subscribe there. The second one is for me, the admin. In this form I want to send emails to all subscribers. This form is simple. Just one field for selecting the entity and a second action field for sending the mails- As described, I added the handler "Entity email". But what do I enter in the "To" field? (The recipients.) There is no option "subscribers". So I looked for a suitable token, but there is none, which doesn't surprise me because the subscribers are entered in another webform.
The default value for the "To" field is [site:mail]. That works. But this ist not what I need. I need to send the email to all subscribers, who seem to be not available in the send-form.
Can you help please?

Reiner

💬 Support request
Status

Fixed

Version

1.0

Component

Miscellaneous

Created by

🇦🇹Austria RFMP

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸Spain omarlopesino

    I notices too late about this issue :/ and I don't know if my answer will be useful as possibly the root problem is fixed somehow. However, I will reply in case this is needed for future use cases.

    The To field is the same field used at the standasrd Webform email handler, as you mention it must be filled with either the manual list of emails or a token.

    To add subscribers dynamically, it is needed to code it as it is not possible to dynamically get them out of the box. There are two possible solutions that needs to be evaluated:

    1. In a custom module, implement hook_token_info and hook_tokens to provide a token with the list of subscriber emails, separated by comma.
    2. If the subscribers are saved through a contributed module that manage newsletter subscriptions, a submodule into webform entity email can be created.
Production build 0.71.5 2024