How to feed variable into HTML email body - Send outlook email activity


I am trying to send an email which would contain dynamic variable in the email body.

The email body is an HTML doc extracted from outlook.

How do I include the variables using send outlook email activity so that my email body in HTML also includes dynamic variables

I have used string.format(HTML template, Variable name) and included the variable place holder{0} within the body bu its not working

Any help is appreciated

In the Body argument of the Activity, you should be able to add your variables to the string you put in there:
"<html> <head> <title>Example document</title> </head> <body> <table> <tr> <td>"+ String1 + " " + String2 +" </td> </tr> </table> </body></html>"

Make sure you check the “IsBodyHTML” property on the send mail activity you are using and as long as the HTML is formatted properly (including the variables being passed) it should be displayed in the body of the email like expected. If you have specific issues you may post the code (or a snippet) and I could offer more help.

Thanks a lot guys for your input, so this method worked for me, and here is the link:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.