Intricate Gmail Exporting Question
February 12, 2012 2:39 PM   Subscribe

I need a .txt file that contains the text of all the messages in my gmail account with a particular label, from a particular email address. What is the best way to make this happen?

Ideally, the .txt file would contain just the words that the sender wrote, with none of the html junk that exporting email usually comes with.

What is a fast, safe and cheap way to do this?

I'm not sure how threading will complicate things: in any particular thread (with the given label), I want only the messages that come from a particular email address.

Any ideas?
posted by milestogo to Computers & Internet (4 answers total) 1 user marked this as a favorite
I think you should start by downloading all the mail to a local email client like Thunderbird. From here, you can check if Thunderbird's built-in features work for you or just the SQLite Manager addon. This addon requires that you know SQL but it can do all kinds of filtering and extracting to text files.
posted by Foci for Analysis at 2:50 PM on February 12, 2012

Nice! I know SQL. good suggestion.
posted by milestogo at 2:53 PM on February 12, 2012

I have used Gmail-Backup for retrieving all mail from accounts before. The software is a bit dated (2009), but I used it as recently as last month and it still works fine. It is donation-ware, but I don't thing the developer is doing anything with it anymore.

Following the download, I imported into Thunderbird (or it may have been Outlook) and then exported again to Excel where I did all the cleanup. Gmail-Backup though does not have a whole host of options. When I have used the app, I have always opted to download everything regardless of date. Obviously this can take a while if you are an email pack-rat like I am.

I don't know SQL at all, so not sure of what tricks you use there, but I have a bunch of Excel tricks that I use for the cleanup.

Sounds like the SQL option is better, but GMB has its merits.
posted by lampshade at 3:04 PM on February 12, 2012

I have successfully used Python's imaplib to fetch specific emails from a Gmail account, but it does require a bit more tech skill than either of the above options (imaplib is not the easiest library to figure out). Some example code here.
posted by penguinliz at 4:15 PM on February 12, 2012

« Older Turn me on to some new music?   |   Screenshot from The Vow Newer »
This thread is closed to new comments.