I created a sitecore ticket for that and they suggested me to use username
instead of email id
. The system should then be able to fetch the email from the user's profiles, it worked and it sent email to only that particular user.
But if you add any wrong username
which doesn't exist in content hub or add email id
which is not a user name then it sent that email to all the users created in my content hub instance.
Sitecore accepted this as a known issue and that has been fixed in Content Hub 4.2.2.
The reference is MONE-32071:
https://doc.sitecore.com/ch/en/users/42/content-hub/release-notes--04-02-02--resolved-issues.html
To workaround the issue you could:
- Make sure that at least one usernames in the recipient list is valid
- Upgrade to the latest Content Hub release
Update-1
If you want to know more about how to send email notifications in Content Hub please follow my below blog post.
https://logicalmindscom.wordpress.com/2023/06/19/sending-email-notifications-in-sitecore-content-hub/