3 ms·
Email is hard (I wrote a blog series on it at http://quetzalcoatal.blogspot.com/search/label/email-hard http://quetzalcoatal.blogspot.com/search/label/email-har
by jcranmer 7y ago
Email is hard (I wrote a blog series on it at http://quetzalcoatal.blogspot.com/search/label/email-hard http://quetzalcoatal.blogspot.com/search/label/email-hard, and I haven't even touched anything beyond the message format!).
Some highlights:
* The MIME and message format specifications are often implemented incorrectly (particularly whenever you deal with non-ASCII text!), so you need a lot of logic interpreting the mess that people think is a valid email.
* IMAP is a database synchronization protocol that doesn't think it's a synchronization protocol, and isn't really well-suited for its tasks. That also means, once again, it's often implemented incorrectly, so you get to spend a lot of time working around server bugs. (There was one message where I managed to get 4 different results from 4 different servers on what its structure was!).
* The big webmail services (e.g., Gmail) often use their own extensions that they really want you to use. So you need to have custom code for big servers. And users demand feature parity, so you have to support it.
* By the way, you also need to integrate a web browser to display HTML email. Except quirks of email rendering abound. And there are severe privacy and security concerns too--you need to disable JS at the very least, and often times be very careful about network access so that people can't leak contents out.