title: Duplicate a draft message in Mail using AppleScript
body: <p>I have a message in Mail's Drafts folder.  I would like to duplicate it (preserving its attachment), add a TO address, then send it (the duplication).</p>
  
  <p>I'm not able to reference the duplicate.</p>
  
  <pre><code>tell application "Mail"
  
    set theTemplate to the (first message of drafts mailbox)
  
    set theDuplicate to (duplicate theTemplate to drafts mailbox)
  
    // error: The variable theDuplicate is not defined.
    display dialog ((subject of theDuplicate) as rich text)
  
    tell theDuplicate
  
      -- add the recipient
      make new to recipient at end of to recipients with properties {name:("Foo Bar"), address:("foo.bar@domain.com")}
  
      -- send message
      send
  
    end tell
  
  end tell
  </code></pre>
  
  <p>Mail's Dictionary entry on <code>duplicate</code> suggests that what I'm trying to do is supported:</p>
  
  <blockquote>
    <p>duplicate v : Copy an object.</p>
    
    <p><strong>duplicate</strong> specifier : The object(s) to copy. </p>
    
    <p>[<strong>to</strong> location specifier] : The location for the new copy or copies.</p>
    
    <p>[<strong>with</strong> properties record] : Properties to set in the new copy or copies right away.</p>
  </blockquote>
  
  <p>What am I not understanding?</p>