Hey, Adrian.
And welcome back.
Now, in today's video, we are going to look into the ACS template from a practical point of view.
Now, at this stage, there are two primary steps that you'll have to work on.
First one is you have to create a new template.
So this template that you see, it needs to be created first.
And then once the template is created, you can send a personalised email based on that template as
a base reference.
Now at this stage in the console, if you look into the email templates, there is no way to create
an email template from the console here.
However, the API is available so you can make use of the CLI commands to create a template now at a
later stage, even if the template related functionality is available through G, that is not an issue.
We'll use the CLI based approach as this will also improve our overall learning.
Now for today's demo I have two file.
One is the base template file and second is the test email.
So this is the email where things will be personalized.
So let's explore both of them.
So the first one is the template JSON.
So this is the base template file.
And if you look over here, the template name is my template.
You have the subject, you have the HTML and you have the text part.
So in the HTML you have the H one.
So this hello followed by name.
This will be bold.
And you also have the variable of name here and the variable of favorite animal.
So this is one specific part.
Before we send a personalized email, let's first create a template.
Now, creating a template through this is quite simple.
So you have the Yes create template click command that you can make use of.
So the command looks something like this.
You have a base create template followed by you have to specify the JSON file.
In my case, it is template json.
Let's remove this small typo.
So again, I will be adding both of these files as part of the resource section so you can download
it and try it out from your site as well.
Now again, you have to make sure that your CLI is properly configured.
In my case, our SES is configured at the Mumbai region and I already have the appropriate access keys,
secret keys and the region configured.
So once this base is set, let's press enter grid now from the SES console, let's refresh the page
and our template is now created.
Now the second step is to go ahead and send a personalized email.
So before we do that you will have to quickly create a configuration set.
Let's just call it as config set.
We'll just leave everything as default here.
We'll just create a configuration set and now we can go ahead and send a personalized email.
Now at this stage you have to also look into the verified identities.
In my case, it is instructors at the captain and in the test email JSON file.
You have to replace this address with the verified identities address.
All right.
Apart from that, you specify the template as my template.
You have the config set, the name is config set over here.
And in that template data, you can replace your the name and the favorite animal.
The next step is to go ahead and send the email using this specific format.
Now to send an email, the command is very simple.
You have a place to send templated email followed by the CLI input JSON and you specify the file and
the file name is test hyphen emailed or JSON.
I'll say test hyphen, email, JSON and we got the message ID back.
And from the email you see we have this HTML part which is bold, which is Hello zeal, and your favorite
animal is elephant.
So all of our variables are also been replaced.
Great.
So I hope with this you understood the templates from a practical point of view, and with this will
conclude today's video.