Requirement is to send templated mail based on received bodydata from api. BodyData may not contain some tags. see below sample Template part.
<p>{{sender}} has invited you to join team {{teamName}}</p>
so body data may not contain teamName. So I want to put if condition on {{teamName}} in template.
Please help me here to find solution
For conditional logic in an SES template you can use if else statements like you would in code. For your example you would use something like
<p>{{sender}} has invited you to join team {{#if teamName}}{{teamName}}{{/if}}</p>
Taken from the following documentation
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-advanced.html