SMTP

how to pass a variable into email body

Same way you would with any variable.

“Static text” + someVariable

variable contains some extracted data

What is the datatype of the variable?

array of string

Then you can use Join to convert it to a string.

image

image

I want to pass the variable in a email body

Hi @Savitri1

Check this out

Thanks

Hi @Savitri1,

First, create your html template. Label the fields that you will specify as variables to be unique in html. (Ex: Hello [Name],)

Save this as a text file.

Each time you read the template, modify the output to assign the variables you want instead.

resultString.Replace(“[Name]”,“John”).ToString

Regards,
MY

Email body is just a string. You can put what I showed you directly into the email body. Here is an example…

image

itemHTML is a string containing an HTML table I built from the queue item.