Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*
- This is part of a workflow for moving and printing email attachments from a given sender
- For the rest of the solution see the post at:
- http://wp.me/p1ItrK-Wf
- Copyright 2014 Phil Stokes Applehelpwriter.com
- *)
- using terms from application "Mail"
- on perform mail action with messages theMessages
- -- see the example at the end of my blog post (link in the header) for how to format this line:
- set attachmentsFolder to "Volumes:<name of volume>:<name of folder>:" as rich text
- tell application "Mail"
- set selectedMessages to theMessages
- try
- repeat with theMessage in selectedMessages
- repeat with theAttachment in theMessage's mail attachments
- set originalName to name of theAttachment
- set savePath to attachmentsFolder & originalName
- save theAttachment in file savePath
- end repeat
- end repeat
- end try
- end tell
- end perform mail action with messages
- end using terms from
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement