How to pass a variable in outlook email

Hi,

While passing a variable to body of an outlook mail, i am getting an error like string constant must end with double quote.

example mail:
"Hi,
Here is the output.
Total inputs: " + Inputs.rows.count +

“Thankyou”

Hi @mani93

If you want some linefeed in your string, try to use Environment.NewLine like below.

example mail:
“Hi,” + Environment.NewLine +
“Here is the output.” + Environment.NewLine +
"Total inputs: " + Inputs.rows.count + Environment.NewLine +
Environment.NewLine +
“Thankyou”

I tried this also but still facing the same issue

@mani93

May I know what error are you getting here ?

Hi @mani93

Check if all of the double quotes are normal and half-angle.

Re chek on here
output.
Total inputs: "

Assign everything to a string type variable and then pass it to the body.\

As you have new line characters in the string, better to go with HTML. Everyline with a paragraph tag and then pass it to the body with IsBodyHTML property checked @mani93

same "

String constant must end with double quote

Input.rows.count :- will give you Int so after that put
Input.rows.count.ToString