Repository navigation
Replies: 2 comments
|
Thanks for writing the proposal up! Generally, I think it makes sense. Sending an email to multiple Keycloak Administrators will also enable the "reply-all" button, which seems like a nice benefit.
Another option worth discussing is extending Kecloak APIs and specific classes to always accept a collection email addresses and rely on one SMTP submission rather than a loop. The implementation should probably aim for backwards compatibility. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Current status of this discussion
Problem description
EmailSenderProvidercurrently accepts only a single recipient address / UserModel. The same is true for the default implementationDefaultEmailSenderProvider. This prevents custom event listeners, authenticators, or admin actions from easily sending out the same single email to a multiple recipients at once.Picture the following user-story:
To my understanding, devs willing to setup a custom flow to fulfill the story above have gotten only a few incomplete and/or lackluster options:
OR
EmailSenderProviderin "production mode" or otherwise. I can speak from personal experience an confess I've struggled with this.OR
adminrole is, seems redundant and error-prone. There may be security implications from repurposing a group email as for a User too?Solution
Add overloaded
sendmethods (or a new method?) that accept a collection of addresses / UserModels (or a richer recipient descriptor). Keep the existing single-recipient methods for compatibility. Document the expected behavior around personalization, BCC/CC and failure handling.Assumptions
DefaultEmailSenderProvider.P.S.
I have already re-implemented the provider internally. Nevertheless I believe this could bring value upstream and would be willing to open an Issue and a subsequent PR if there is consensus on the API shape. Happy to support with tests and docs as well.
[1] #14522
[2] #23162
cc: @pszabo891, @gudrutis
All reactions