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
vote
1 answer

How to get a return value from getAllInternetHeadersAsync?

I created an Office add-in, and I'm wondering how to get the Internet headers using getAllInternetHeadersAsync? I have the below code, which will send the headers to the console: var headers = ""; // Get the internet headers related to the…
BigDataFiles
  • 105
  • 1
  • 10
1
vote
1 answer

Does order in email headers indicate which MTA inserted each?

I'm trying to analyze a mail header to figure which element (MUA, MTA...) creates each. My supposition is: The sender MUA composes the body (including Content-Type, Mime, Content-Transfer-Encoding), and sends it via SMTP to the sender border MTA.…
Kaikus
  • 1,001
  • 4
  • 14
  • 26
1
vote
3 answers

Formatting VCard in PHP

I'm trying to generate a VCard via PHP, and them email it out to the user. I wrote an initial script with hard-coded data, but the end-result will fill in the VCard from MySQL. When viewing the VCard side-by-side with a legitimate VCard (downloaded…
jwegner
  • 7,043
  • 8
  • 34
  • 56
1
vote
0 answers

PHP Mime Mail Parser & Sending Mail Server

This PHP Mime Mail Parser library is very useful: https://github.com/php-mime-mail-parser/php-mime-mail-parser Example request: $arrayHeaderTo = $parser->getAddresses('to'); It lets you analyze the intended recipient, sender, subject, etc., of an…
Ben Coffin
  • 483
  • 4
  • 13
1
vote
0 answers

OpenTracing/corellation-id in email header

I wonder if a good idea to add some of tracing values from Open Tracing specification into emails headers, like it injected into HTTP headers. It will help us to understand what service had send specific email message in customer cases. Is this a…
Leotsarev
  • 1,040
  • 7
  • 23
1
vote
1 answer

imap headers of a quoted mail

I'm sending an email with some xheader. When the recipient of the email replays to that email, i want to parse it, and get the content of that xheader from the mail i get by replay. unfortunately, when i'm parsing the email i get back, i don't see…
Boris C
  • 669
  • 2
  • 7
  • 14
1
vote
0 answers

How to identify whether an email is read receipt response or not using headers

I am just learning about read receipts. I wonder how to identify whether a mail is read receipt response or normal reply? I surfed the internet and got some header from RFC. Are those the only way to identify them. Is it possible for a read receipt…
Ahamed Yasir
  • 189
  • 1
  • 13
1
vote
1 answer

Google Apps Script: How to set headers with GmailApp.sendMail() or GmailApp.createDraft()

I'm trying to write a function that sends reminders to all who don't replied within a few days. The problem is: createDraftReply() and reply() will set recipient to my own mail address because the docs say: Reply to the sender of the last message…
Buntel
  • 540
  • 6
  • 19
1
vote
1 answer

Maximum length of reply-to header

Is there a maximum length for the reply-to header field? The maximum length for a e-mail address is defined but in reply-to you can add several addresses.
NCC-2909-M
  • 709
  • 1
  • 7
  • 15
1
vote
1 answer

Blackberry - MS exchange combination strips in-reply-to & reference header from email

I am working on system for adding mail replies to some database. Currently this does not work with "Blackberry + Microsoft exchange" combination. It works well with "Ipad + Exchange", "Blacberry + gmail", "Desktop +exchange" combination. I noticed…
Ram Deshpande
  • 55
  • 1
  • 5
1
vote
2 answers

Email headers: Allowed/disallowed characters in FROM header: (display) name

I'm trying to find an answer to the question about which characters is allowed (or disallowed) in the FROM header (display) name.. "My Display Name" I'm talking about the My Display Name in quotations. I've looked at…
Emil Devantie Brockdorff
  • 4,724
  • 12
  • 59
  • 76
1
vote
4 answers

PHP Mail Headers

Essentially what I'm trying to do is attach a file to an email I'm sending out. Simple enough, right? For some reason or another it does not like the following code (presumably because of the headers). Can anyone help? Thanks in advance!! $subject =…
Ryan
  • 557
  • 3
  • 7
  • 19
1
vote
1 answer

How to replace/overwrite default header of EmailMultiAlternatives

Environment: Ubuntu 18.10, Python 2.7.15, Django 1.11.16 I'm trying to send an email containing an inline image. I have the following code: msg = EmailMultiAlternatives(some_subject, some_body, 'from@some-domain.com', ['to@some@domain']) img_data =…
Ciprian Stoica
  • 2,309
  • 5
  • 22
  • 36
1
vote
0 answers

How to set mail header for Contact Form web page

I have to make something like a contact form to send email from a website. In the form fields there are the sender mail address and is where the receiver reply to. How should I set mail headers to be compliant to most antispan and to let the…
Tobia
  • 9,165
  • 28
  • 114
  • 219
1
vote
1 answer

Add a reply email to customer notifications based on shipping methods in Woocommerce

All order email sending to CUSTOMER from default woocommerce email address, for example, webshop@shop.com and this is OK, but I want add a reply email address for these emails, so user able to reply this custom address, such as…