I have a label that sorts all my email marketing from one company. I want to export the search results so I can grab the subject lines. There are about 350 messages, and I wanted to research the subject lines. Any ideas?


You can use MsgExtract to export only the subject lines or any other email field to excel or to a text file.

After you label the search in gmail, you only need to select the same label in MailExporter and then select the email parts that you want the export:

enter image description here

You can find further information about MsgExtract exporting features here:


(Disclaimer, I am the author of Msgextract)

  • That is EXACTLY what I was looking for @jponce thanks. I will try it out :) – gabearnold Nov 10 '12 at 15:44
  • Mac OS support? – Alex Cook Jan 16 '13 at 20:17

One way to do this is to extract messages to text files by using an IMAP mail client and then using a regular expression to extract subject lines from these text files.

I tried this with Thunderbird.

By default, Thunderbird exports messages by creating one text file per message. Thunderbird names files according to this format: "{subject} - {sender} - {date}.eml". So I already had subjects in file names. Then I just used terminal and redirected ls (use dir, if using Windows) output to a separate text file:

ls -1 > mymessages.txt

In Windows you'd do this:

dir /B > mymessages.txt

If you want to get rid of the sender and date part, you can use your favorite regex supporting text editor (like Notepad++ or vi) and find

^(.*) - .* - .*.eml

in mymessages.txt, replacing it with $1 or \1 (depending on your editor)

  • I may try this - but I would have to download 51,000+ message first. I'm not sure if that's a good plan... – gabearnold Nov 5 '12 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.