

Set theMessageContent to the content of theMessage Set theMessageSubject to the subject of the theMessage Set theMessageSender to sender of theMessage Set theMessageDate to the date received of theMessage Slightly modified version of Efficient Computing's AppleScript: I have, therefore, modified the original AppleScript to generate a message:// with John Gruber’s suggested method, using it as a source URL for a new note. This is very handy if you want to open the original message in Mail without having to open the note’s detail popover first. That URL format, in fact, becomes clickable in Evernote’s source field above the note editor. In my tests, I’ve discovered that percent-encoded message:// URLs work better for Evernote’s source URL parameter. By percent-encoding the characters, apps like TextEdit and Safari will offer an “Open URL” option upon control-clicking any portion of the URL. With Cocoa apps, that is still the case in Mountain Lion. Here’s why: if you paste the URL itself into a text field in any Cocoa app that uses NSTextView, you can then Control-click anywhere in the URL itself and use the Open URL and Make Link commands at the top of the contextual menu, because Cocoa will recognize the text as a URL.

However, I have found that the second format - message://%3cMESSAGE-ID%3e (with slashes) - is better. The first URL format listed above - message:%3cMESSAGE-ID%3e (no slashes) - is the one that Mail generates when you drag a message out of Mail. In researching options, I found this 2007 post by John Gruber explaining possible schemes for message:// URLs: It means that, on OS X, you can click such URL or manually launch one (from, say, Safari) to go directly to a message (it will open in a new Mail.app window). Not widely documented, message:// is a URL scheme that Mail uses in combination with so-called “message IDs” to reference individual messages. To ensure a lightweight communication between Evernote and Mail.app, I wanted to add message:// URLs to the note. The message’s content as the actual note (in rich text).A short header of “From”, “Subject”, “Date”, and “To” fields.The original AppleScript uses a selected Mail message as the base for a new rich text note in Evernote that contains: Mine is a super-quick modification of this AppleScript by Efficient Computing. Fortunately, by combining this script with an old tip by John Gruber, I managed to assemble a simple AppleScript that does exactly what I want. I knew it was possible with AppleScript, but after searching on Google, I couldn’t find the perfect solution that fit my needs. In trying out the new Evernote beta for Mac, I ended up looking for a way to quickly send a selected Mail message to Evernote.
