title: MessageSource expression - Failed to lock variable
body: <p>I'm attempting to use the send-mail task to send a message upon the successful completion of a data-flow task.</p>
  
  <p>When the package is executed, an error is generated:</p>
  
  <blockquote>
    <p>Error: Failed to lock variable "The extraction was
    successful.</p>
    
    <h2>PROPERTIES</h2>
    
    <p>Starting: 10/27/2015 Ending: 10/27/2015 11:59:59 PM Records: 207 " for
    read access with error 0xC0010001 "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.".</p>
  </blockquote>
  
  <p>The send-mail task's <code>MessageSourceType</code> is set to <code>Variable</code>.</p>
  
  <p>The expression assigned to the send-mail task's <code>MessageSource</code> property:</p>
  
  <pre><code>"The extraction was successful.\n\n" +
  "PROPERTIES\n" +
  "----------\n\n" +
  "Starting: " + (DT_WSTR, 50) @[$Project::StartingDateTime] + "\n" + 
  "Ending: " + (DT_WSTR, 50)  @[$Project::EndingDatetime] + "\n" + 
  "Records: " + (DT_WSTR, 50) @[User::OriginalRecords] + "\n"
  </code></pre>
  
  <p>The <code>User::OriginalRecords</code> variable is being (correctly) populated by a row-count task. </p>
  
  <p>What am I doing wrong?</p>