Created
October 27, 2016 19:03
-
-
Save benwaldie/e5b3eb9c49e948821aab589b52f9dd6b to your computer and use it in GitHub Desktop.
Save Selected Mail Message Attachments
This file contains 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
set theSavePath to path to desktop folder as string | |
tell application "Mail" | |
selection | |
set theMessage to item 1 of result | |
set theAttachments to every mail attachment of theMessage | |
repeat with anAttachment in theAttachments | |
set theName to name of anAttachment | |
save anAttachment in file (theSavePath & theName) | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment