How to View the Source of a Message in Apple Mail

Use Mail Source Code to Avoid Spam

What to Know

  • In the Mail app, open an email > View > Message > Raw Source.
  • The code contains the sender's IP address, email client, relay path, and more.

This article explains how to open the source code for an email in the Apple Mail app on Mac OS X Lion (10.7) and later.

How to View the Source of a Message in Apple Mail

Behind every email is the hidden source code that contains information about the message: who sent it, how it traveled, and other information. In Mail, you can take a look at the source code data for any email quickly. Here's how to see it.

  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.

    The Raw Source command
  3. The source code will open in a new window.

    Source code for a message in Apple Mail
  4. You can find a wealth of information in the source code, including:

    • the sender's IP address
    • the relay path the email took to reach you
    • the sender's email client

    If you suspect a message is spam, you can use this data to confirm you shouldn't click any links in it. Some red flags are outdated email clients and IP addresses from countries other than the one the sender claims to be from.

  5. To save the source code to your desktop or print it out for further study, use Save as or Print in the File menu.

    The Save As and Print commands
Was this page helpful?