Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > How do I batch export many emails from apple mail to a text file?

How do I batch export many emails from apple mail to a text file?
Thread Tools
miacomet
Forum Regular
Join Date: Nov 2005
Location: MA
Status: Offline
Reply With Quote
Jun 30, 2006, 10:08 PM
 


I'm using 10.4.7.
     
suthercd
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Jun 30, 2006, 10:42 PM
 
Take a look at Automator's Combine Mail Messages. After opening Automator, select the Mail Library and then the combine Mail Messages action. First add the Get Selected Mail Items action then the Combine Mail Messages action.You could then add an action to create a TexrEdit document to be the recipient of that text. You could also use Applescript to loop through a group of messages and copy the message body text to a document. To me, the Automator method is pretty straightforward.

HTH
C-
     
miacomet  (op)
Forum Regular
Join Date: Nov 2005
Location: MA
Status: Offline
Reply With Quote
Jun 30, 2006, 11:14 PM
 
Thanks for the reply!

There used to be a nice applescript around to download several years ago, and several OS's ago to do this kind of thing. Has anyone seen one recently?
     
miacomet  (op)
Forum Regular
Join Date: Nov 2005
Location: MA
Status: Offline
Reply With Quote
Jul 1, 2006, 10:12 AM
 
Originally Posted by suthercd
Take a look at Automator's Combine Mail Messages. After opening Automator, select the Mail Library and then the combine Mail Messages action. First add the Get Selected Mail Items action then the Combine Mail Messages action.You could then add an action to create a TexrEdit document to be the recipient of that text.

Ok, I've been trying this and I can't get it to work right. I do the automator, I add "Get Specified Mail Items", I then put a mailbox into this box, Then I select "Combine Mail Messages", and then I run it. And it runs but nothing seems to happen.

I don't know how to tell it to create a textedit document to be the recipient. Any further help would be greatly appreciated!
     
suthercd
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Jul 2, 2006, 10:38 AM
 
Originally Posted by miacomet
I don't know how to tell it to create a textedit document to be the recipient. Any further help would be greatly appreciated!
Select TextEdit in the Library list, which in turn will show you the actions available for it. Drag the action New Text File action below the other two actions.

In the pane for each action, it shows at the top the type of information that can be received and at the bottom the kind of information created. Once you have that working and a document named untitled.txt is created on your Desktop, click the Options triangle in the TextEdit action. It will display some additional capabilities. Click on Show Action when Run, then show selected items and Save As. The action will pause when running and ask you for a file name and save location.

To run the workflow, Open Mail.app, select several messages by command-clicking on them, them switch to Automator and run the workflow. The first action, Get Selected Mail Items, expects to have messages selected by the user before the workflow is run.

I'll check in later to see if you have other questions or if I can offer a better explanation of the steps involved.

HTH
Craig
( Last edited by suthercd; Jul 3, 2006 at 12:12 AM. )
     
miacomet  (op)
Forum Regular
Join Date: Nov 2005
Location: MA
Status: Offline
Reply With Quote
Jul 2, 2006, 12:44 PM
 
Originally Posted by suthercd
Select TextEdit in the Library list, which in turn will show you the actions available for it. Drag the action New Text File action below the other two actions.

In the pane for each action, there it shows at the top the type of information that can be received and at the bottom the kind of information created. Once you have that working and a document named untitled.txt is created on your Desktop, click the Options triangle in the TextEdit action. It will display some additional capabilities. Click on Show Action when Run, then show selected items and Save As. The action will pause when running and ask you for a file anem and save location.

To run the workflow, Open Mail.app, select several messages by command-clicking on them, them switch to Automator and run the workflow. The first action, Get Selected Mail Items, expects to have messages selected by the user before the workflow is run.

I'll check in later to see if you have other questions or if I can offer a better explanation of the steps involved.

HTH
Craig

Hey thanks very much! I have gotten this far.

I believe that I can do what you are describing. But in the end the text file that I get seems to be organized in some fashion which I don't understand. Perhaps it is organized by the subject name, I don't know...

But I'd like, if possible, the messages to appear in the text file organized in the order of their date stamp. Is there anyway to guarantee that happening?

I'm also not sure how I get the messages into automator by commanding-clicking them. If I click on a bunch of messages and attempt to drag them to automator nothing seems to happen for me. I can only seem to get messages into automator by using the "+" buttton in the Get Specified Mail Items box and then selecting the messages by subject line.

I appreciate your help alot!
     
suthercd
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Jul 2, 2006, 04:14 PM
 
Once you have selected messages in the Mail.app by clicking on them, Automator will be able to know which messages were selected. With Automator open, set up the actions we have discussed in the the thread. Then switch to Mail and select a few messages. Activate Automator by clicking on its icon in the dock (or whatever method you want) and run the workflow- the messages will remain selected in Mail and this is the key to accessing them in Automator. That first action is designed to detect selected messages in Mail.

The order of the message text is determined by how the messages are sorted in Mail. Click on the Date Received column header in the message viewer window to sort messages by date, clicking again will flip the sort order between newest->oldest and oldest->newest. Set up your sort order before selecting the messages.

Craig
( Last edited by suthercd; Jul 3, 2006 at 12:13 AM. )
     
miacomet  (op)
Forum Regular
Join Date: Nov 2005
Location: MA
Status: Offline
Reply With Quote
Jul 2, 2006, 04:22 PM
 
Works like a charm! Awesome! Thanks a million!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:47 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,