Mail automate attachment download

Joined
Jan 15, 2011
Messages
6
Reaction score
0
Points
1
Location
Sydney, Australia
Your Mac's Specs
iMac11,3
I am fairly new to Macs and to AppleScript. I want to automate the download of some mail attachments to a folder in documents. I have found a few scripts that I have tried to implement to no avail. I receive a file which I want to replace in the folder as the latest version, i.e I only want the one version of the file. I have setup a rule to handle it and it supposedly calls the script I have created. Following is the script I am using. If anyone could clarify this for me I would appreciate it.
using terms from application "Mail"

on perform mail action with messages theMessages for rule theRule

tell application "Mail"

repeat with oneMessage in theMessages

set {mail attachment:theAttachments} to oneMessage

repeat with oneAttachment in mail attachments of oneMessage

save oneAttachment in ("Macintosh HD:Documents:Users:Michael:Documents:MailAtts:") & ("OpenOrdersLog")


end repeat

end repeat
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top