Re: Saving mail attachments...
Re: Saving mail attachments...
- Subject: Re: Saving mail attachments...
- From: Luther Fuller <email@hidden>
- Date: Thu, 10 Mar 2011 08:25:36 -0600
On Mar 9, 2011, at 11:43 PM, Jean-Christophe Helary wrote:
> In any case, the script I wrote recognizes attachments when they are displayed in default view but not when they are displayed after I changed the view. I guess it comes from my asking the script to save attachments from the selected mail and not from the displayed/open mail...
>
> Any idea ?
This may help. Or not. But you need to know this about Mail ...
Every message has an id number. (See Mail's dictionary.)
If the message is located in the On My Mac mailbox "mailboxName", then the folder
Users:username:Library:Mail:Mailboxes:mailboxName.mbox:Messages:
will contain a file named "nnnnnn.emlx" where nnnnnn is the id of the message.
If the message contains an attachment, then there will exist a folder
Users:username:Library:Mail:Mailboxes:mailboxName.mbox:Attachments:
which contains the sub-folder "nnnnnn" which is a copy of the attachment.
The items in the "Attachments" folder are redundant. If you Trash the sub-folder "nnnnnn",
the message file still contains the attachment.
In order to use this, you will have to script "Finder", not "Mail".
(My Mail scripts simply ignore attachments. So you may run into problems I have not experienced. )
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden