Like any web page, email messages not sent in plain-text are composed in HTML - a simple set of formatting instructions to display text, images, and links. Some emails (plain-text messages) don't use HTML at all, they only contain unformatted text. All emails, however, include email headers, which are essentials to mail servers and email programs to know where to send and how to display messages. You're already familiar with some headers, which are visible: the "
From" sender, the recipients ("
Cc", and "
Bcc"), plus the subject line. Others include importance (priority level), and read-receipt requests. The last type of headers are typically always hidden: the IP address from which the message was sent, the email app or webmail client used to send that message, etc. In this tutorial, we'll show you how to view the full email headers for messages sent to your Hotmail account, and how Outlook.com lets you view the HTML source of any such message!
Quick Steps to view source code and email headers in Hotmail:
Once you've logged into your inbox, select any message you want. Only the basic headers are shown: that includes the sender's name or email address (how to change your display name), the date sent, the main recipients ("To" field), and the subject line. That's what those headers look like, by default:
To show more details, click on the down-pointing, double-chevron icon next to the main recipient names (highlighted on the above screenshot). This will reveal what Outlook.com calls the "
detailed headers", but you'll be able to get much more detailed information, as you'll see in the next section. You can see that Hotmail has expanded our basic headers into an explicit list of display names and email addresses . Instead of just the date, you now see the exact date and time at which the message was sent. Click on the double-chevron once more to hide that information.
Tip: you can also view the detailed headers by clicking on the "Actions" button, which is visible when a message is opened (on the right of the sender's name and date). Then, click on "Show header details" at the bottom of the dropdown menu.
Just like you can right-click on web pages and "View Source" to see the underlying HTML code, Hotmail lets you view the entire source code of an email, starting with email headers. To show all email headers, plus the message's HTML source code, either go back to the Actions menu, and this time select "View message source", or right-click on a message in the folder listing, and choose "View message source" from the context menu:
A new browser tab / window will operation, so make sure that it isn't blocked by your popup blocker. (Tip: in Internet Explorer, you can temporarily override your popup blocker by holding down the Ctrl and Alt keys while clicking on that link!) This text dump is not highlighted or formatted in any way, so it might look a bit intimidating at first. But it's actually very simple: the full email headers themselves are listed at the top. Here's an example - we've underlined the "email header directives: A later tutorial will in much more depth about analyzing email headers, but for now, here are a few notes. The following directives are the ones you saw earlier in our "
detailed headers" view:
Date:. The unique
Message-ID: directive is used by Hotmail (and other email programs / webmail client to keep track of messages individually). This and optional thread ID's can be used to recognize related messages in Hotmail's conversation view, or when you forward an email.
Return-Path:" is generally the same email address as the one used to send the message, but it could be different once you change your reply-to address, or if you send messages from Hotmail using another email account.
You may see an "
X-Originating-IP:" directive in message headers: that's the IP address the sender used when sending that particular email. When you send a message using a desktop email program, your actual IP address may appear inside headers. When you send messages from a web browser, using a "
webmail client" (email web app), the provider's IP address will typically be used instead (Hotmail / Outlook.com, Gmail, Yahoo Mail, AOL Mail, etc.) So, if you are concerned about emailing someone you don't quite trust, it's always best to use webmail than your desktop email client. This matters less when you are using a mobile email app, since your IP address changes as you switch cell tower, or when you use a public internet connection (coffee shop, the public library, etc.) A few years ago, Hotmail stopped including your actual IP address, and uses instead an encoded version of it (
X-EIP) which allows Microsoft to fight spam, but without jeopardizing users' privacy!
Following the list of email header directives, you'll see the body of the message: in some cases, you'll have two versions of it. One in plain-text (for email recipients who have turned off HTML mail in their program), and an HTML (web-page-like) version of that message, which includes images, links, and other types of formatting instructions. Here's the HTML source code for a Bing newsletter: Notice that the top portion (plain-text) is very readable: that's because it doesn't contain any type of formatting instruction like the markup language / HTML tags you see in the bottom portion. In theory, you could paste the HTML content inside a file, save it as HTML, and you'd have a web page! In practice, there are other types of codes that would not play nice in some web browsers.
When you send attachments from Hotmail (and other services), you can add images in three different ways: a linked reference to a picture hosted online; an image added as file attachment; or, lastly, an image embedded inside the body of the message, using "
Base64 encoding". If that's the case, you'll see a lot of gibberish intuitive message's source code: these weird characters are converted into a picture! The Login Tips logo visible on the left screenshot is the picture we used when creating our Hotmail signature: if you looked at the source code of a message that includes our signature, you would not see the image encoded inside the message. The most efficient approach, which Outlook.com takes by default, is to link images from an external source: