mdelatorre icon

SmallCubed MailSuite script to auto download email attachments

mdelatorre | PRO | 10/01/20 02:44:41 AM UTC (Edited) | 0 ⭐ | 1019 👁️ | Never ⏰ | []
AppleScript |

880 B

|

None

|

0 👍

/

0 👎

-- The configuration can be watch in the image at: https://i.imgur.com/VKQZitv.png
-- 1. Install the Mail Act-On component of SmallCubed MailSuite
-- 2. Store the AppleScript in the ~/Library/Application Scripts/com.apple.mail/ Folder
 
use AppleScript version "2.7" -- Catalina (10.15)
use scripting additions
--                                              
--  Save attachments of selected Mail messages to the folder you set for myAttachmentPath   
--                                          
set myAttachmentsPath to ("/Users/username/Desktop/myAttachments/")'s POSIX path        
tell application "SmallCubed MailSuite"                         
   repeat with aMessage in (get selection)                          
      repeat with anAttachment in mail attachments of aMessage                  
        set attachmentName to name of anAttachment                      
     save anAttachment in POSIX file (myAttachmentsPath & attachmentName)           
      end repeat                                        
   end repeat                                           
end tell
</pre>                                          

Comments