How to send template based email using Azure communication service?

smart 20 Reputation points
2023-06-30T02:39:09.4433333+00:00

I want to send email based template. So I want to have templates in separate files.

ex: assets/templates/email_template.html.

Now I am using @azure/communication-email javascript library.

Is it possible?

User's image

This is HtmlEmailContent interface from @azure/communication-email library.

I don't have an idea how to use the email template from a separate file.

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,234 questions
0 comments No comments
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2023-07-03T06:51:52.1033333+00:00

    @smart

    Thanks for reaching here! ACS Email does not natively offer templates support but if you can manage templates externally, you can definitely load the full email content from the file into a string variable in memory and assign that to the html property of an HtmlEmailContent object to send the email.

    Please let us know if further query or assistance is required.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.