How to Find Email Headers and Source Code


Email headers and source code are important for a few reasons. They are key to helping our team troubleshoot delivery and content problems on your behalf. In addition they provide you with more detailed information related to the transmission process and display of your email.

What is source code?

Source code contains the HTML that controls the display of an email. Learn more about source code.

How to locate source code

The steps to locate the full source of your email differ widely for all email clients. Search online for instructions for your specific email client. Oftentimes the instructions are the same as for locating your email headers (outlined below).

What are email headers?

Email headers identify routing information of the message, including the sender, recipient, date and subject. You are also able to create custom email headers on our Enterprise plan. Learn more about custom email headers.

How to analyze an email header

First, in order to view the headers, you’ll need to download them from within your email client. Choose your email client from the list to get instructions, or search online for your particular email client’s instructions.

Now to break down a full email header.

Here’s an example:

Received: from
(2603:10b6:610:50::14) by with HTTPS
via CH2PR16CA0004.NAMPRD16.PROD.OUTLOOK.COM; Tue, 14 Jul 2020 15:10:36 +0000
Received: from
(2a01:111:e400:7e1e::4b) by (2a01:111:e400:7e1e::409)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Tue, 14 Jul
2020 15:10:35 +0000
Received-SPF: Pass ( domain of
designates as permitted sender); client-ip=;;
Received: from ( by ( with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.3174.21 via Frontend Transport; Tue, 14 Jul 2020 15:10:34 +0000
Received: by id h1n5ek2lshkm for <>; Tue, 14 Jul 2020 15:10:34 +0000 (envelope-from <>)

The received is the most important part of the email header and is usually the most reliable. They form a list of all the servers/computers through which the message traveled in order to reach you.

The received lines are best read from bottom to top. That is, the top "Received:" line is your own system or mail server. The bottom "Received:" line is where the mail originated. Each mail system has its own style of "Received:" line. A "Received:" line typically identifies the machine that received the mail and the machine from which the mail was received.

Authentication-Results: spf=pass (sender IP is;; dkim=pass (signature was
verified);; dmarc=bestguesspass action=none;compauth=pass reason=109

Authentication results generally tell you the results of SPF, DKIM, and DMARC.

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=dk;;

DKIM-signature. Learn more information about DKIM.

To: "Hanna Fray" <>

This shows to whom the message was addressed but may not contain the recipient's address.

From: "Hanna" <>

This displays who the message is from. However, this can be easily forged and can be the least reliable. That said, the domain displayed is where the reputation of the email is attached. Thus, it’s important to know how to protect your domain. One way to do this is by implementing a DMARC policy. Learn more about DMARC.

Subject: Welcome to Lilly's Loft

This is what the sender placed as a topic of the email content.

Date: Tue, 14 Jul 2020 10:10:34 -0500

This shows the date and time at which the email was received by your email client.

List-Unsubscribe: <>,

The unsubscribe information will provide the link to unsubscribe from the communication. It’s a unique header that some mailbox providers leverage to allow for easier unsubscribing. Learn more about how list unsubscribe helps email deliverability.

Message-ID: <>

A unique string assigned by the mail system when the message is first created.


This is also known as Mail From, Envelope From, origin, bounce address, SPF domain, mailed-by, mail server domain, RFC 5321. This is the address where a bounce notification will go.

MIME-Version: 1.0

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that extends the format of email. The presence of this header field indicates the message is MIME-formatted. The value is typically "1.0". MIME versions are how we package up a text and html version of an email into one package.

Content-Type: text/plain; charset=utf-8

Generally, this will tell you the format of the message. In 99.9% of the messages sent from ActiveCampaign, it will be multipart/alternative.

It’s important to note that the receiving and sending servers are the ones adding the headers. Your email header will likely contain even more data points than listed above, but these are the most common across all email clients. You can also utilize third-party tools to help you break down and analyze message headers to help identify where a delay may have occurred. One of our favorites is Messageheader or MxToolbox.

When inputting the email header above, Messageheader returned the following result:


Example analysis of an email header

In the below, we are using Messageheader to break down the data into a more digestible format. As you can see from the first line item, there was a 10-minute delay in the delivery of this message FROM (ActiveCampaign server) to its first destination at Comcast. 


Learn more about why delays may occur.

Overall, email headers and source code are nothing to be intimidated about, and analyzing this data helps to resolve many of the delivery and display issues that impact email marketers.

Was this article helpful?
4 out of 9 found this helpful

Have more questions? Submit a request

Start free trial