Hi there.
I'm completely new to Mac's and therefore applescript. I've been looking for a way to automatically save attachments from emails into a specified folder. I understand there are 2 elements to the process - (1) creating an applescript, (2) creating the rule in Mail. I'm fine with the second point, but I'm struggling with the script...I've pasted what I've been trying to use below.
I enter the script. Select the Compile option. Then save into specified folder for Mail rules. I set the rule up, but nothing is getting saved.
Help! I have about 50 monthly reports that come through on email and this would make the job so much more efficient!
using terms from application "Mail"
on perform mail action with messagestheMessages
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'smail attachments
set originalName to name of theAttachment
set savePath to attachmentsFolder & originalName
savetheAttachmentinfilesavePath
end repeat
end repeat
end try
end tell
end perform mail action with messages
end using terms from
I'm completely new to Mac's and therefore applescript. I've been looking for a way to automatically save attachments from emails into a specified folder. I understand there are 2 elements to the process - (1) creating an applescript, (2) creating the rule in Mail. I'm fine with the second point, but I'm struggling with the script...I've pasted what I've been trying to use below.
I enter the script. Select the Compile option. Then save into specified folder for Mail rules. I set the rule up, but nothing is getting saved.
Help! I have about 50 monthly reports that come through on email and this would make the job so much more efficient!
using terms from application "Mail"
on perform mail action with messagestheMessages
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'smail attachments
set originalName to name of theAttachment
set savePath to attachmentsFolder & originalName
savetheAttachmentinfilesavePath
end repeat
end repeat
end try
end tell
end perform mail action with messages
end using terms from