• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mail: save attachment fails in Mountain Lion 10.8.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail: save attachment fails in Mountain Lion 10.8.2


  • Subject: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • From: "koenig.yvan" <email@hidden>
  • Date: Wed, 26 Sep 2012 15:16:24 +0200


Le 26/09/2012 à 11:08, Brian Christmas <email@hidden> a écrit :


On 26/09/2012, at 6:15 PM, koenig.yvan <email@hidden> wrote:

…

G'day scripters

I've been following this with great interest. However, I've got a problem. Quite often our clients send emails with folders as attachments. The folders with their contents show as a single attachment, but can't be saved  using the FILE command. Is there any answer to this please?

Regards

Santa

set ptd to path to desktop
set newFolderName to "2012-09-26 162222Z"
set newFolderPath to (ptd & newFolderName) as text
tell application "Finder"
if not (exists folder newFolderPath) then (make new folder at ptd with properties {name:newFolderName})
end tell
set newFolderPath to newFolderPath as alias
tell application "Mail"
activate
set tempmessage to message 1 of mailbox "* items to shift"
set selected mailboxes of message viewers to mailbox "* items to shift"
set theSelectedMessage to message 1 of mailbox "* items to shift"
repeat with eachAttachment in theSelectedMessage's mail attachments
try
save eachAttachment in file (newFolderPath & (name of eachAttachment) as rich text)
on error errmsg
try
save eachAttachment as (newFolderPath & (name of eachAttachment) as rich text) --< tried this for folder, but crashed
on error errmsg
display dialog errmsg
end try
end try
end repeat
end tell


Try to replace :

save eachAttachment in file (newFolderPath & (name of eachAttachment) as rich text)
by

save eachAttachment in file (newFolderPath & ":" & (name of eachAttachment) as rich text)

Yvan KOENIG (VALLAURIS, France) mercredi 26 septembre 2012 15:16:20



 _______________________________________________
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

  • Follow-Ups:
    • Re: Mail: save attachment fails in Mountain Lion 10.8.2
      • From: Brian Christmas <email@hidden>
References: 
 >Mail: save attachment fails in Mountain Lion 10.8.2 (From: Neil Faiman <email@hidden>)
 >Re: Mail: save attachment fails in Mountain Lion 10.8.2 (From: Lists <email@hidden>)
 >Re: Mail: save attachment fails in Mountain Lion 10.8.2 (From: Neil Faiman <email@hidden>)
 >Re: Mail: save attachment fails in Mountain Lion 10.8.2 (From: Lists <email@hidden>)
 >Re: Mail: save attachment fails in Mountain Lion 10.8.2 (From: "koenig.yvan" <email@hidden>)
 >Re: Mail: save attachment fails in Mountain Lion 10.8.2 (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • Next by Date: read a file - Lion vrs Tiger
  • Previous by thread: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • Next by thread: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • Index(es):
    • Date
    • Thread