On Tue, 30 Aug 2016, at 10:56 PM, Matthew Horsfall (alh) wrote:
> That doesn't really clarify anything though does it?. Both "from" and
> "to" are in the headers, but these are different data types on
> setMessages.
These are two representations of the same data. The `headers` property
on the Message object gives you the raw headers, e.g.
"headers": {
"from": "Joe Bloggs <[email protected]>",
"to": "John Smith <[email protected]>, [email protected]"
}
As in the spec, it is of type String[ String ].
While the `from` and `to` (and `cc`/`bcc`) properties on the Message
object give you parsed representations and are of type
Emailer[]|null, e.g.
"from": [{
"name": "Joe Bloggs",
"email": "[email protected]"
}],
"to": [{
"name": "John Smith",
"email": "[email protected]"
}, {
"name": "",
"email": "[email protected]"
}],
"cc": null
Now if you are setting rather than getting, we need to define what
happens should a client both set a `from` or `to` property AND include a
`from` or `to` field inside a `headers` property (even though it's
unlikely a client would ever do this in practice, at least
intentionally). The spec says in this case the `from`/`to` properties
overwrite the version in the `headers` property.
Is that clearer?
Neil.
--
You received this message because you are subscribed to the Google Groups
"JMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jmap-discuss/1472597755.1712655.710897977.571C7050%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.