Sorry, I meant the actual whole body of the email, not just the text part.
For example if in thunderbird you select an email and press ctrl+u it opens the body (source) of the email. If there are attachments, there are lines like this
Content-Type: application/x-gzip; name="*censored*.xml.gz"
I just need to scan that.