I am trying to build an email message using Send Mail task but taking some of the message in the email from two user defined variables that I have set in Execute SQL Task (i.e. configuring Result Set to relate my user defined variables to the column names where I'm reading the values from).
The expression I've tried to build in the Send Mail task is below:
"The xxxx xxxxxx report was successfully processed with an open date of: " + @[User::FileDate2] + "and an open time of: " + @[User::FileTime2]
But I get the error is
"The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created."
However, it seems to work if I just select the user variable i.e. if I just choose User::FileDate2 then I get the value I'm looking for but obviously no messages around what it means just a date.
What can I do to get the email message I'm looking for?