Use email template to send email using outlook activity

Hi Team,
I have an email template provided by the client to send email whenever the validation fails.
Can anyone please let me know how this can be done.
Like this there are 7 different email templates for different validation failure.Campaign_Launch_Template - (1.2 MB)

Hi @som17,

You can save the templates as a txt file. Based on the exception, You can read that txt file and Update any dynamic values if needed and send it as mail.

For instance, ImproperData.txt file contains the following data.

Hi Team,

Error - {0} is occured at {1}.

Warm Regards,

  1. Read the file "ImproperData.txt" and store it as strMail1
  2. Use below code to add dynamic values.

strMail1 = String.Format(strMail1, exception.message, DateTime.Now.ToString());

  1. Use the variable in message to send mail.

Hope it helps, Mark it as a solution if you find it is useful

Warm Regards,
Ranjith Udayakumar