Subscribeon perform_mail_action(theData)
tell application "Mail"
set theSelectedMessages to |SelectedMessages| of theData
set theRule to |Rule| of theData
repeat with a from 1 to count theSelectedMessages
set theOutputFolder to ("Full:path:to:folder:") as string
set theMessages to selection
set theMessage to item 1 of theMessages
set theAttachments to every attachment of content of theMessage
repeat with a from 1 to length of theAttachments
set theAttachment to item a of theAttachments
try
set theAttachmentName to name of theAttachment
set theSavePath to theOutputFolder & theAttachmentName
save theAttachment in theSavePath
end try
end repeat
end repeat
end tell
end perform_mail_action
You are not logged in, either login or create an account to post comments
If Mail.app cannot, you can always install and run procmail. This is hard to configure, and might be overkill.
I bet it can be done, and someone smarter than me with the Mac stuff will have an answer for you soon.
posted by procrastination at 8:16 PM on June 19, 2007