Get headers from email in outlook
To get headers from an email in Outlook, you can use the following methods:
Method 1: Using the Outlook UI
- Open the email you want to view the headers for in Outlook.
- Click on the "View" tab in the ribbon.
- Click on "View Settings" in the "View" group.
- Click on "Other Settings" in the "View Settings" dialog box.
- Scroll down to the "Headers" section and check the box next to "Show headers".
- Click "OK" to close the dialog box.
The email headers will now be displayed at the top of the email message.
Method 2: Using the Outlook VBA Editor
- Open the Outlook VBA Editor by pressing "Alt + F11" or by navigating to "Developer" tab in the ribbon and clicking on "Visual Basic".
- In the VBA Editor, navigate to the "ThisOutlookSession" module.
- Create a new subroutine by clicking "Insert" > "Module" and then typing the following code:
Sub GetEmailHeaders() Dim olItem As Object Set olItem = Application.ActiveExplorer.Selection.Item(1) MsgBox olItem.Headers End Sub
- Replace
Application.ActiveExplorer.Selection.Item(1)
with the email you want to view the headers for. - Run the subroutine by clicking "Run" or pressing "F5".
The email headers will be displayed in a message box.
Method 3: Using PowerShell
- Open PowerShell and navigate to the Outlook folder:
cd $env:USERPROFILE\AppData\Roaming\Microsoft\Outlook
- Run the following command to get the headers of the currently selected email:
Get-Item -Path (Get-Process -Name outlook | Get-Item -Path Property -Name MainWindowTitle).MainWindowTitle | Select-Object -ExpandProperty Headers
Note: This method requires PowerShell 3 or later.
Method 4: Using a third-party add-in
There are several third-party add-ins available that can help you view email headers in Outlook, such as Header Analyzer or Email Header Viewer. These add-ins can provide more advanced features and functionality than the built-in methods.