Access your outlook to retrieve emails with the header

I want to access my outlook and retrieve an email with some specific header text and later on I need to open that mail and extract email headers.

How can I do it, I never worked in email Automation,any help will be much appreciated.