How to View the Source of a Message in Mac OS X Mail

Use Mail Source Code to Avoid Spam

Woman using her phone on the beach

 Hero Images / Getty Images

The email in your inbox that you open and read is just the tip of the email iceberg. Behind it is the hidden source code of the email that contains an overwhelming amount of information regarding the message, who sent it, how it traveled to you, the HTML used to display it, and other information that makes sense only to the most astute student of technology. In macOS and OS X Mail, you can take a look at the source code data for any email quickly.

Why Examine an Email's Source?

Whether it is for identifying the origin of spam or for techy fun, having a look at the raw source of an email message can be interesting. Also, when you or your email provider's customer support department is troubleshooting delivery or content problems, being able to see the entire source code data can be helpful. By studying the expanded header information, you may be able to identify a forged sender or avoid a suspicious phishing effort.

View the Source of a Message in Mac OS X Mail

To display a message's source in macOS and Mac OS X Mail:

  1. Open an email in the Mail app on your Mac.

  2. Select View > Message > Raw Source from the menu to open the source code in a separate window. Alternatively, use the keyboard shortcut Option-Command-U.

  3. Save the source code to your desktop or print it out for further study, using Save as or Print in the File menu.

Don't be surprised if you want to close the window holding the source code immediately — it can be a little forbidding. However, if you study it line by line, it begins to make some sense.