Using AWS SES Email Template With LWC

Mukul Mahawariya
1 min readOct 21, 2022

--

Introduction —

We are going to send emails using a template stored on AWS with dynamic data.

In my previous blog I have explained how to connect LWC with SES, please read through my previous blog on -
Integrating Amazon Simple Email Service(SES) with Salesforce Lightning Web Component (LWC), for all the setup processes.

Now we are going one step ahead.

Creating an Email Template —

To pass data dynamically in the template we need to set tags. For example-

Name:{{name}} /*REPLACEMENT_TAG_NAME : REPLACEMENT_VALUE*/

Updating the Email Template -

Sending Email With Template—

TemplateData: This stores the values you want to replace in the template with their tag.

Conclusion -

In my previous blog, I explained how we could send emails using AWS SES but the template was fixed, we need to change the template every time before sending emails.

We can utilize the template functionality provided by AWS to send emails by just updating the data.

--

--

Mukul Mahawariya

4x Salesforce Certified | Trailhead Ranger | Salesforce Enthusiast