I have a ScriptTask that assigns values of nodes from an XML email template to SSIS package variables. I then use those variables in a SendMailTask. In the SendMailTask, when I create the following expression for the MessageSource field:
"There was an error in processing order #" + @[User::ErrorOrderId] + " for the vendor " + @[User::ErrorVendorName] + "."
I get the result in the email body:
There was an error in processing order #000000 for the vendor Acme.
This is the output that I want. But when I add the same expression to an XML email template, and in a ScriptTask assign that expression to the variable @[User::EmailErrorMessage]. In the SendMailTask Expression I assign the MessageSource field that variable, the output in the email is the string literal without and parameters being replaced:
"There was an error in processing order #" + @[User::ErrorOrderId] + " for the vendor " + @[User::ErrorVendorName] + "."
My question is, is there a way to pass an SSIS Expression as a variable?