Hello Shriram,
Do these templates are made with the email connector module or with another module, software, template provider?
If created with the module you can try to see if everything imports well in your application including the tokens and including the relationship to the tokens, maybe you need to extra refresh the mx reflection module or need to make some other adjustments.
If it is created with other software then i would advise to first make yourself familiar with how the email connector module uses its entities to provide the token service and template service, after you can compare the email connector template with the third pary template and you need to map the right fields and create the right logic to transfrom the external template to the email connector template.
Hope this helps,
Good luck
Hi Shriram,
Are the templates to be fetched only once or every time you need to send a specific email?
If it is only a one time thing, I suggest to, for each template fetched via API:
If the templates are to be fetched in runtime every time you need to send an email:
After retrieving the template via API, you can use replaceAll() to replace all occurrences of a dynamic value with the actual value. Then create an EmailMessage, add your $HTMLBody to it and send the email.