function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AkshiiiiiAkshiiiii 

send email on button click

I have created an Email template and public group. Now I need to create a button on a record page that will send an email (from the template) to the public group. How can I code this in lightning?
AnkaiahAnkaiah (Salesforce Developers) 
Hi Akshi,

Please follow the below blog and try.

Lightning componet:
https://salesforcecodex.com/salesforce/send-email-using-email-template-and-apex/
refer the below link for Apex logic to get the public group users.
https://developer.salesforce.com/forums/?id=906F00000008wXvIAI

If this hepls, please mark it as best Answer

Thanks!!