by criddell · 7y ago · 0 comments
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.
And nobody wants to start a new one, because the majority of people use webmail or the mail app on their phone. Thunderbird is at 1% marketshare, although the sparkchart is weird suggesting measurement difficulties: https://emailclientmarketshare.com/
Analytics is usually counted by displaying invisible remote HTTP images and looking at the user-agent of the HTTP request. Thunderbird blocks all HTTP requests in email by default for privacy reasons, which means it's systematically undercounted in these surveys.
- mail transfer and delivery (IMAP/POP3, SMTP)
- organization, folders, tags, database, search, indexing, etc. Performance becomes a big issue.
- Email threading (conversations) is a whole thing.
- Email file format, MIME standards, parsing emails is a WHOLE thing. (What is an rfc822-formatted email and why I am getting them?)
- For non-text email, need an entire HTML rendering engine.
- The graphical user interface is not trivial, should be intelligently multithreaded.
- More features: spam filtering, encryption/digital signatures. Vacation replies. Address book. Calendar integration is a whole (optional) thing. Todo-lists.
- For some reason, Thunderbird has a live chat system.
It also seems to be the kind of thing where the last 10-20% is a lot harder than the first 80%.
The codebase in general is also quite a tangle, as newsgroups code (newsgroups are still supported!) is mixed with mail code. All past attempts to make the email composition window a tab, which is a deceivingly simple task, failed.
The tangles come from poor separation of low-level protocol/parsing code with the front-end logic--there's no way to parse a message (or even decrypt it) without displaying it at the same time, for example.