String|null
The plain text body part for the message. If there is only an HTML
version of the body, a plain text version will be generated from this.String|null
The HTML body part for the message if present. If there is only a plain
text version of the body, an HTML version will be generated from this.String|null
The plain text part of the message to send in response to messages when
the vacation response is enabled. If there is only an HTML version of
the body, a plain text version SHOULD be generated from this.String|null
The plain text message to send in response to messages when the vacation
response is enabled. If there is only a plain text version of the body,
an HTML version MAY be generated from this, or it may be sent as
plain-text only.If you agree that the current version is not enough clear, I can make a PR to match the vacation version which is more explicit.
Regards,
Raphaël Ouazana.
What is the point of converting textBody into htmlBody?
String
The plain text body part for the message. If there is only an HTML version of the body, a plain text version MUST be generated from this.String|null
The HTML body part for the message if present.On Wed, 6 Jul 2016, at 01:14 AM, Raphaël Ouazana wrote:What is the point of converting textBody into htmlBody?The idea was this: for simplicity, clients may only want to have to deal with rendering HTML rather than having a separate code path for rendering plain text (which will need to mark up URLs etc.). Similarly, basic clients may always want just to handle a plain text version.(Requesting just "body" will return the htmlBody if the message has an HTML part, otherwise the textBody, which is probably what you want for most rich clients.)Certainly I think we need the ability for clients to be able to always request a plain text version, for those that cannot safely handle HTML (older browser support, lower power devices). The ability to always request an HTML version is arguably less useful, although is consistent.If we dropped the generation of an HTML version we could make it:
- textBody:
String
The plain text body part for the message. If there is only an HTML version of the body, a plain text version MUST be generated from this.- htmlBody:
String|null
The HTML body part for the message if present.
Perhaps a better alternative (and more consistent) is to make the standard "textBody"/"htmlBody" properties be only if present, but add special properties "generate-htmlBody"/"generate-textBody" you could request that would then generate a "textBody"/"htmlBody" if not present. (This is a bit like the special "body" property you can request; it's not actually a property that's returned, but it affects what is returned for textBody/htmlBody). Thoughts?
If we dropped the generation of an HTML version we could make it:
- textBody:
String
The plain text body part for the message. If there is only an HTML version of the body, a plain text version MUST be generated from this.- htmlBody:
String|null
The HTML body part for the message if present.Thank you for your answer. This modification seems perfect to me.