title: How to set the sender of the current Mail.app outgoing message via AppleScript?
body: <p>I'd like to write an AppleScript to set the sender of the current outgoing message in Apple's Mail.app.</p>
  
  <p>I've tried this:</p>
  
  <pre><code>tell application "Mail" to set sender of front outgoing message to "&lt;my email address&gt;"
  </code></pre>
  
  <p>but I get the error message <code>error "Mail got an error: Can’t set sender of item to any." number -10006 from sender of item to any</code> which doesn't make sense to me.</p>
  
  <p>When I try to interrogate the front outgoing message as follows:</p>
  
  <pre><code>tell application "Mail" to get properties of front outgoing message
  </code></pre>
  
  <p>I get <code>{class:item}</code> in return, instead of an "outgoing message" object like I'd expect.</p>
  
  <p>Any ideas?</p>