Created
February 4, 2016 01:21
-
-
Save dannysmith/e9356d991fd74c36acb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- See here: http://www.macstories.net/tutorials/send-selected-mail-message-to-evernote-with-source-url/ | |
| -- Slightly modified version of Efficient Computing's AppleScript: http://efficientcomputing.commons.gc.cuny.edu/2012/03/17/copy-email-message-in-mail-app-to-evernote-applescript/ | |
| tell application "Mail" | |
| --get selected messages | |
| set theSelection to selection | |
| set theMessage to item 1 of theSelection | |
| set evernoteEmail to "[email protected]" | |
| set theMessageURL to "message://%3c" & theMessage's message id & "%3e" | |
| set the clipboard to (theMessageURL) | |
| --set theMessageLink to "<a href='" & theMessageURL & "'>Original Message Link</a>" | |
| --set theMessageDate to the date received of theMessage | |
| --set theMessageSender to sender of theMessage | |
| --set theMessageContent to content of theMessage | |
| --set theMessageSubject to the subject of the theMessage | |
| set theRedirectedEmail to redirect theMessage with opening window | |
| tell theRedirectedEmail | |
| make new to recipient at beginning of to recipients with properties {address:evernoteEmail} | |
| end tell | |
| keystroke "O" | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment