Lan Khuat created JAMES-3379:
--------------------------------
Summary: Email/get specific parsed headers
Key: JAMES-3379
URL: https://issues.apache.org/jira/browse/JAMES-3379
Project: James Server
Issue Type: Improvement
Reporter: Lan Khuat
Some header fields may be fetched in a parsed form. The structured form that
may be fetched depends on the header.
[https://jmap.io/spec-mail.html#properties-of-the-email-object] 4.1.2
The following parsings should be supported:
* {{:asRaw}} Type: String, raw encoded value
* {{:asText}} Type: String, decoded value
* {{:asAddresses}} Type: EmailAddress[]
* {{:asGroupedAddresses}} Type: EmailAddressGroup[]
* {{:asMessageIds}}: Type String|Null
* {{:asDate}}: Type Date|Null
* {{:asURLs}}: Type: String[]|null
{code:java}
{
"using": [
"urn:ietf:params:jmap:core",
"urn:ietf:params:jmap:mail"],
"methodCalls": [[
"Email/get",
{
"ids": [ "message_id1"],
"properties": ["header:X-HEADER-NAME:asText"]
},
"c1"]]
}
Will return
{
"sessionState": "75128aab4b1b",
"methodResponses": [[
"Email/get",
{
"accountId":
"29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
"state": "000001",
"list": [
{
"id": "message_id1",
"header:X-HEADER-NAME:asText": "PARSED2"
}
]
},
"c1"]]
}{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]