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