message_id or email_message_id property of the message. The gmail_message_id (prefixed with gm-) can also be used.Since we do not keep full copies of emails on our servers, this call triggers a connection to the IMAP server to fetch the message headers.
| name | type | description |
|---|---|---|
| optional: | ||
| raw | integer | By default, this returns messages headers parsed into an array. Set this parameter to 1 to get raw unparsed headers. |
{
Name-Of-Header: arrayValues for that header (some headers can appear morethan once in the message source),
...
}
It is very common to have more than one occurrence of some headers so for those, an array makes obvious sense, for the rest, yes, we could have left them as plain old strings. However, it would be seriously annoying to always test whether the value for a given header is an array or a string whevener you want to access it. Putting everything in strings makes it easy to uniformly access them.
If you want to fetch headers, body and flags for a given message, you can use the related include_* GET parameters on the message instance to get them all in a single call.