News for hackers. Stuff that matters.
Re:Envelopes - Python email for humans by ihuman on Wednesday August 07, 2013 @04:15PM (#6175316)
It is called text_body because there is also an html_body.

http://tomekwojcik.github.io/envelopes/api/envelope.html

Re:Envelopes - Python email for humans by mey on Wednesday August 07, 2013 @04:56PM (#6175566)
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.
Re:Envelopes - Python email for humans by ihuman on Thursday August 08, 2013 @12:58AM (#6177402)
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.