So if you set both, will it auto-magically do multipart/mime/alt? That is pretty nice.
Re:Envelopes - Python email for humans
by ianstormtaylor on Thursday August 08, 2013 @12:56AM
(#6177396)
Ah 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.
But then your emails can't have HTML and a plaintext backup.
Re:Envelopes - Python email for humans
by ianstormtaylor on Thursday August 08, 2013 @01:03AM
(#6177412)
Ah 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.
http://tomekwojcik.github.io/envelopes/api/envelope.html