Re: Mail and Attachments
Re: Mail and Attachments
- Subject: Re: Mail and Attachments
- From: "Automated Workflows, LLC Mailing Lists" <email@hidden>
- Date: Thu, 25 Aug 2005 12:43:26 -0400
In Mail, an attachment is not an element of a message, it is an
element of the content of a message. That said, the following code
seems to work for me now to save attachments from Mail in Tiger.
set theOutputFolder to (choose folder) as string
tell application "Mail"
set theSelection to selection
set theMessage to item 1 of theSelection
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 tell
-Ben
Benjamin S. Waldie
President & CEO
Automated Workflows, LLC
610.935.0652
=============================================
AppleScript and Workflow Automation
Consulting - <http://www.automatedworkflows.com>
AppleScript Info - <http://www.applescriptguru.com>
AppleScript Training - <http://www.applescripttraining.com>
=============================================
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden