Importing From MailMate to a Specific EagleFiler Folder

I have a related question, but I’m not sure if I should be asking it in this forum or the MailMate one. The bundle works fine for me, but messages end up at the root level of Files in the open EF archive. Would it be possible to adapt the EagleFilerImport script within the bundle to direct files to a specific EF folder?

(I know that MM can do this independently via a rule, which is what I do now, but the advantage of the bundle is that it keeps tags intact.)
Thanks

Yes, if you look at the EagleFilerImport.scpt file in the bundle, there is a section that looks like this:

if _tags is {} then -- use default tags
	import files {_emlPath} source URL _sourceURL with deleting afterwards
else
	import files {_emlPath} source URL _sourceURL tag names _tags with deleting afterwards
end if

You could replace it with this:

tell library document 1
    set _folder to library record "YourFolderName" of root folder
end tell
if _tags is {} then -- use default tags
    import files {_emlPath} source URL _sourceURL container _folder with deleting afterwards
else
    import files {_emlPath} source URL _sourceURL tag names _tags container _folder with deleting afterwards
end if

Many thanks Michael.
Would it be possible to replace <“YourFolderName” of root folder> with the full Unix path of a folder in an EF archive, thus avoiding the need for the archive to be open? That has always seemed a significant limitation of the bundle when aiming to automate incremental archiving from MM to EF.

No, this needs to be the name of a top-level folder in the current library.

Before tell library document you could add this to open a particular library:

	open POSIX file "/Users/your/Path/To/LibraryName.eflibrary"

OK, thanks again Michael. That would be a practical option, but I think the simplicity of being able to send message files to a dormant library folder without troubling EF probably outweighs the advantage of being able to preserve tags with the bundle/AS route. That way they just get scanned and indexed next time the library is opened.

A post was split to a new topic: Preserving HTML E-mails With Linked Images