Questions tagged [email-headers]

E-mail headers are the headers at the beginning of an e-mail that define various properties (e.g. `From` or `Reply-To`) of the e-mail.

In an e-mail, the body (content text) is always preceded by header lines that identify particular routing information of the message, including the sender, recipient, date and subject. Some headers are mandatory, such as the FROM, TO and DATE headers. Others are optional, but very commonly used, such as SUBJECT and CC. Other headers include the sending time stamps and the receiving time stamps of all mail transfer agents that have received and sent the message. In other words, any time a message is transferred from one user to another (i.e. when it is sent or forwarded), the message is date/time stamped by a mail transfer agent (MTA) - a computer program or software agent that facilitates the transfer of email message from one computer to another. This date/time stamp, like FROM, TO, and SUBJECT, becomes one of the many headers that precede the body of an email.

Characteristics

A single email header has some important characteristics, including perhaps the most important part of an email - this is the KEY:VALUE pairs contained in the header. Looking at the above, you can tell some of the KEY:VALUE pairs used. Here is a breakdown of the most commonly used and viewed headers, and their values:

  • From: sender's name and email address (IP address here also, but hidden)
  • To: recipient's name and email address
  • Date: sent date/time of the email
  • Subject: whatever text the sender entered in the Subject heading before sending

Routing

Email headers also provide information on the route an email takes as it is transferred from one computer to another. As mentioned earlier, mail transfer agents (MTA) facilitate email transfers. When an email is sent from one computer to another it travels through a MTA. Each time an email is sent or forwarded by the MTA, it is stamped with a date, time and recipient. This is why some emails, if they have had several destinations, may have several RECEIVED headers: there have been multiple recipients since the origination of the email. In a way it is much like the same way the post office would route a letter: every time the letter passes through a post office on its route, or if it is forwarded on, it will receive a stamp. In this case the stamp is an email header.

List of Email Header Fields

IANI maintains a list of email headers here.

405 questions
-1
votes
1 answer

How to guarantee an email is unique?

An email has a Message-ID that is guarenteed unique by either the client program sending the email or the first email server (source). To declare an email as unique then, I'd need both the Message-ID and an ID of the client program sending the email…
Preston
  • 7,399
  • 8
  • 54
  • 84
-1
votes
1 answer

Find sending mail server's IP address from e-mail header

I want to perform an SPF authorization check. In order to do that, I need to get the IP address of the sending mail server. Although the rule is (in the case of multiple Received fields) that you should look at the last Received, after testing with…
-1
votes
1 answer

Auto replacement of subject line in inbound Outlook emails

I need to replace the contents of the subject line of all incoming email (whatever it maybe ) with "EBIT Support" and that same mail then forwarded to the new and correct inbox- an ideas vey welcome!!
Cheryl
  • 1
  • 1
-1
votes
1 answer

Email headers of a real person

I am working on creating a system that requires me to differentiate a email that is sent by a real person or a automated bot. I used gmail-api and got pretty sure that all emails under "Personal" label would have all the real life people emails,…
-1
votes
1 answer

Get receiver email address using c# pop3

That sounds funny. But in Gmail, we get list of both sent and received emails in pop3. So i need to get email address of sent emails (receiver). hint: for received emails we check email like this message.Headers.From.Address But i need info of sent…
Sahil Bhatia
  • 165
  • 1
  • 1
  • 8
-1
votes
1 answer

php mail function headers with attachment

I'm not sure why but this has suddenly stopped sending out emails. I have tried to test the email server using mail("email@domain.com","test","test message"); and it sends it fine. I have a feeling something is wrong with my headers? I have tried to…
626
  • 1,159
  • 2
  • 16
  • 27
-1
votes
1 answer

Get concise email header Outlook Mailitem VB.Net

I am catching the outlook mailItem after its being sent. I would like to get the email header i.e. To, From, CC, Subject, Body etc. I have tried using Const PR_TRANSPORT_MESSAGE_HEADERS =…
Neophile
  • 5,660
  • 14
  • 61
  • 107
-1
votes
1 answer

Mail Subject decoding

Why does decoding the following fail Subject: =?ISO-8859-1?Q?Begr=FC=DFungsschreibe?=n while decoding the following works? Subject: =?ISO-8859-1?Q?Begr=FC=DFungsschreiben?= I read https://www.rfc-editor.org/rfc/rfc2047 but could not find a note…
guettli
  • 25,042
  • 81
  • 346
  • 663
-1
votes
1 answer

Forward a mail, adding the beginning of the body to the email subject

How can I append the beginng of body to the subject of the mail using e.g. procmail? The body of new mail can be erased.
Marki
  • 660
  • 8
  • 24
-1
votes
1 answer

PHP: imap_header does not display Request Read Receipt and Priority headers

I'm trying to read the Request Read Receipt and Priority headers from email headers via PHP. IT seems that imap_header only displays select headers. The message headers below should but do not include the two headers I'm looking for... stdClass…
John
  • 1
  • 13
  • 98
  • 177
-1
votes
1 answer

Raw Headers in MS Outlook

I'm developing an Outlook Add-In (2007, VBA), which is supposed to send the raw Internet Headers of a MailItem to a Server, which then does some processing. With raw I mean before they are decoded. I am aware of the GetInetHeaders-Function, but is…
fig
  • 15
  • 2
-2
votes
1 answer

Tracing the history of an email chain

I don't know if this is possible or not, so before i get too far down the rabbit hole I wanted to ask the community. I have an email that was sent by person "a", to person "b", "c" and "d". This email was then forwarded from either b,c or d to a…
geekypenguin
  • 63
  • 1
  • 1
  • 6
-2
votes
2 answers

Is it possible to find a php script that sent this email

I have an old website and I just can't find the script that generated emails with these headers: Return-Path: Delivered-To: support@example.com Received: (qmail 46814 invoked by uid 89); 9 Oct 2012 14:06:48…
rinchik
  • 2,642
  • 8
  • 29
  • 46
-3
votes
1 answer

How to set the spf or 'sent via' in email header in php

When you receive a email (in Gmail at least), you see the following format at the top: 'John Doe johndoe@gmail.com via servername.com' I am wondering if there is a way to change the 'servername.com' after the "via" while in doing so keeping my…
J. Doe
  • 53
  • 3
  • 7
-3
votes
1 answer

php: failed email (" Wrong headers and message content ")

i need to know why my email not sent in inbox and not able to attach file here's my headers and message Headers MIME-Version: 1.0; \r\nContent-Type: multipart/mixed;…
Mona Abdelmajeed
  • 686
  • 1
  • 9
  • 19
1 2 3
26
27