View Single Post
  #1   Report Post  
Posted to uk.d-i-y
Caecilius[_2_] Caecilius[_2_] is offline
external usenet poster
 
Posts: 451
Default Pull text from Gmail

On Mon, 18 Feb 2019 19:50:39 +0000, Bill wrote:

I have a bunch of Gmail emails from a certain person and would like to
import all the text into one text file, sorted in date order. The idea
is to get something that I can edit to pull together a mass of technical
information in a way that I can quickly consult it.

At the moment the useful material is mixed in with chat about the
weather etc.

All I've found so far is a Gmail add-on to convert individual messages
to pdf, but nothing that can just grab a lot of emails and pull the text
out of all. It seems there used to be a Google labs app that pulled the
essential text, without headers etc. to a file, but I can't even find
that.

Anyone know of a way to do this?


I think you can download email from gmail using the POP3 protocol.

You could use a POP3 client like fetchmail to download the email and
send it to a an MTA for delivery to a local mailbox. You could then
parse the local mailbox with the tool of your choice, or write a
script to do it.