I would like to read through my all my Gmail emails’ headers to find specific information.
I know there is no access through the GmailApp service (well, pretty sure anyway).
Any ideas on how to get the header information with a solution primarily based in Apps Script?
No, email headers are not possible through the Apps Script services. You’ll have to go the IMAP or SMTP route for that.
—
UPDATE
You got me curious and looks like you can get the important ones through
getRawContent()and manually parse it.Here is the code you can try –
and here is the output from a LinkedIn group message –