title: Can I set the encoding of an e-mail message created by AppleScript?
body: <p>I have to send a mailing list and want to use Apple Mail for this. I have created a script that reads a UTF8 encoded text file and uses this text to set the contents of the e-mail message. This text is in variable thisText. The code importing the text is similar to</p>
  
  <pre><code>set fileHandle to open for access theFile
  set mailText to (read fileHandle) as «class utf8»
  close access fileHandle
  </code></pre>
  
  <p>After this, I make small adjustments to the text for each recipient and prepare the e-mails with the following code:</p>
  
  <pre><code>using terms from application "Mail"
    tell application "Mail"
      set theAccount to "Economy-x-Talk Support"
      set theNewMessage to make new outgoing message with properties ¬
         {account:theAccount, subject:thisSubject, content:thisText, visible:false}
      tell theNewMessage
        make new to recipient at end with properties {address:thisEmail}
        set sender to "Economy-x-Talk Support &lt;xxx@xxxxxxxx.com&gt;"
      end tell
    end tell
  end using terms from
  </code></pre>
  
  <p>The problem is that if the text contains special characters, Mail displays them incorrectly. I believe that Mail doesn't understand that the encoding of the message is UTF8. Is there a way to define the encoding of a message when making it? something like:</p>
  
  <pre><code>properties {encoding:utf8}
  </code></pre>
  
  <p>perhaps? I tried this and it didn't work. I was unable to find the answer elsewhere.</p>