Yes it is possible. I wrote code to read message headers and create menus on my site.
You may have access to the entire contents of the messages.
Here is a link to an article explaining how to do this. They have little explanation (in French) and function code, which is pretty simple. If you think that the code is not enough to understand, I can try to write an explanation in English.
Edit: I will translate the article in English here: How to use the Tumblr headers to create menus on your website?
source share