I'm using a product called "Mail Archiver X" to archive messages from Apple Mail into a custom FileMaker database ("eMailViewerX" - this is the target database that comes with Mail Archiver and is required for the process), from where I copy these messages to my main message archive (another FileMaker DB).
While that process works, it is kind of clumsy (Apple Mail > Mail Archiver X > FileMaker DB #1 > FileMaker DB #2) - and it breaks every time when there is a new version of Apple Mail or OS X until "Mail Archiver X" has been updated by the developer.
So I'm looking for a more simple solution: an AppleScript that will export all messages from exactly one folder ("To Archive") in Apple Mail (4.5/Snow Leopard or 5.0/Lion) as a simple CSV or .tab file, with the following data per line:
Message Sender*
Message Receiver*
Sent Date
Sent Time
Subject
Body
(* Separation of name and e-mail address would be cool, but I understand this may not (always) be possible.)
The only tricky part may be the conversion of carriage returns in the e-mail messages' body into the special character FileMaker expects in TAB or CSV files. In BBEdit, this is shown as \x{0B} (UTF8: 0B). So there would have to be a Find/Replace for that in the script.
No interface, no configuration - just something that spits out all messages from a folder and tells me when it's done.
This does not have to be free (although I wouldn't mind :) - I'd gladly pay for something reliable and simple.
If someone knows about such a script or is willing to write it, I would really appreciate it. I haven't found anything.
TL;DR: I need to export all messages from an Apple Mail folder to a FileMaker-readable CSV file.