<div class="markdown">
<p dir="auto">I used the following AppleScript (triggered by TextExpander) to quickly insert a message:// URL for the currently selected message in Mail.app.</p>
<pre><code> tell application "Mail"
set selectedMessages to selection
set theMessage to item 1 of selectedMessages
set messageid to message id of theMessage
-- Make URL (must use URL-encoded values for "<" and ">")
set urlText to "message://" & "%3c" & messageid & "%3e"
return urlText
end tell
</code></pre>
<p dir="auto">I’d like to do the same thing thing in MailMate. This is super convenient when I want to refer to the message I have selected in a different application.</p>
<p dir="auto">Does anyone know how to write an AppleScript to do this with MailMate?</p>
<p dir="auto">Thanks,<br>
Max</p>
</div>