31
Jan
Export Apple Mail Messages and Notes to Text Files
Tags: Apple Mail, Applescript, Export, Messages, Notes, Text Files
I saw a Tweet from Scott Paterson, asking if there was an AppleScript to quickly batch export Notes from Apple Mail into individual text file.
Well Scott — If there wasn’t one before, there is now!
Features
- This AppleScript will export any selected Messages or Notes in Apple Mail as individual text files to a temporary folder on your Desktop (called “Temp Export Folder”);
- The script also attempts to remove any “illegal characters” from the file name as to avoid the process grinding to a complete halt!
- If you have Growl installed, the script should detect it and notify you when your export is completed.
Current Limitations and Open Issues
(Otherwise known as “Places Where You Could Help Out!”)
- I kept the output very basic — only spitting out the content of the note/message as the content of the text file. It *IS* possible to add more information from the messages and, if people are interested in that, let me know!
- Errors that will undoubtedly arise when you do something that I didn’t think of or test for!
How to Install and Use
First, select the messages or notes in Apple Mail.
Then just run the script… either:
- Manually;
- By using Snow Leopard’s “Keyboard Shortcuts”, or;
- By using FastScripts
Source Code and Download Link on the next page!
Export Apple Mail Messages and Notes to Text FilesPages: 1 2








6 Responses to “Export Apple Mail Messages and Notes to Text Files”
Twitter Comment
Thanks to @veritrope for knocking up AppleScript to export Notes to text files from Mail.app [link to post]
– Posted using Chat Catcher
Thanks for putting this together. Two things: 1) Can I have the original dates exported with the notes? 2) The script fails because it requires Growl which I don’t have installed (I don’t really have a need for Growl). Do you have a version of the script that doesn’t need Growl?
The Growl issue must be a bug — it’s supposed to detect whether or not you have it installed and adjust. Click here to file a bug report so that I don’t lose track of it and, when I’m working on a new revision, I’ll spend some time on this!
A question: How would you want the original dates presented? As a header at the top of the note?
for me, it would be useful to have basic messages headers placed at the top of each txt file. would love to see at least “From:”, “Subject:”, and “Date:”. would that be easy to add if i knew what i was doing?
(i am about to take off on a big trip, am trying to create an archive of the relevant mail folder, don’t really have time to delve into learning applescript just now.)
It wouldn’t be that hard, but I am in the middle of a big trip myself right now, so I’m not sure when I’d be able to add it. Check back here or subscribe to the Twitter feed for updates and I’ll post a notice when I revise it!
You just saved me about an hour. Thank you.
Trackbacks/Pingbacks