4 ms·
It is called text_body because there is also an html_body. http://tomekwojcik.github.io/envelopes/api/envelope.html http://tomekwojcik.github.io/envelopes/api/
by ihuman 13y ago
It is called text_body because there is also an html_body.
http://tomekwojcik.github.io/envelopes/api/envelope.html http://tomekwojcik.github.io/envelopes/api/envelope.html
- mey 13y agoSo if you set both, will it auto-magically do multipart/mime/alt? That is pretty nice.
- ianstormtaylor 13y agoAh good call. Maybe it's just my very maleable Javascript side talking, but if I were making this API in Javascript I'd probably have a "body" and do a super simple check if the first character is a "<", which will solve the 99.999% case for HTML vs. text emails.
- ihuman 13y agoBut then your emails can't have HTML and a plaintext backup.
- ianstormtaylor 13y agoAh I should have clarified that "body" would be a shorthand of sorts. I'd still have an "html" and "text" alternative to satisfy the case where you want to set both, and in that case "text" and "html" are very meaningful. But the "body" makes the simple case, and the examples extremely clean too.