• 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 Scripting - Copy Messages to Finder Folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail Scripting - Copy Messages to Finder Folder


  • Subject: Re: Mail Scripting - Copy Messages to Finder Folder
  • From: Bruce Robertson <email@hidden>
  • Date: Fri, 28 Jun 2013 11:13:13 -0700

Excellent suggestion, I have adopted your method, WAY faster.

Thanks very much.

Bruce Robertson

On Jun 28, 2013, at 12:12 AM, Axel Luttgens wrote:

> Le 27 juin 2013 à 04:19, Bruce Robertson a écrit :
>
>> [...]
>>
>> The purpose is to copy selected messages to a user designated Finder folder.
>> So if you have suggestion for other methods to accomplish this result, of course they are welcome.
>>
>> [...]
>
> Hello Bruce,
>
> One first suggestion, that should avoid to depend on the way Mail stores its messages (unless I'm wrong, this has already changed at least three times in the history of that software).
>
> The script copies the messages as they are stored by Mail. Strictly speaking, they should thus be saved with an ".emlx" extension, not with an ".eml" one, since they contain the original message and some metadata for indexing needs.
>
> So, the very first question is to know the purpose of copying messages as saved by Mail somewhere else. It is very likely that ".eml" files would be sufficient, in which case your problem is solved.
>
> Assuming a helper handler similar to this one:
>
> 	on WriteFile(fldrAlias, fileName, txt)
> 		local fRef
> 		set fRef to open for access file ((fldrAlias as text) & fileName) with write permission
> 		write txt to fRef
> 		close access fRef
> 	end WriteFile
>
> you may remove the "POSIX path of" part of the "set theFolder to..." statement:
>
> 	set theFolder to (choose folder with prompt "Save Exported Messages to..." without invisibles)
>
> and replace the second half of the loop body by:
>
> 	my WriteFile(theFolder, msgDate & "_" & msgSubject & ".eml", source of msg)
>
> HTH,
> Axel
>
>
> _______________________________________________
> 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


 _______________________________________________
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


References: 
 >Mail Scripting - Copy Messages to Finder Folder (From: Bruce Robertson <email@hidden>)
 >Re: Mail Scripting - Copy Messages to Finder Folder (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Changes in 10.8
  • Next by Date: Re: getting time to next Time Machine backup and other information?
  • Previous by thread: Re: Mail Scripting - Copy Messages to Finder Folder
  • Next by thread: Re: Mail Scripting - Copy Messages to Finder Folder
  • Index(es):
    • Date
    • Thread