4 ms·
I've dealt a lot with email along the way, trying to use it as an async transport layer for higher level messaging etc. At one point I had wrappers around Pyth
by codr7 7y ago
I've dealt a lot with email along the way, trying to use it as an async transport layer for higher level messaging etc.
At one point I had wrappers around Python's IMAP/SMTP implementations that I excuted from Go, since at least Python had 20 years to make theirs work properly.
Any other implementation I tried failed somewhere along the way, especially as soon as you start moving messages around in folders or anything else beyond simply fetching messages.
SMTP is simpler from my experience, but then so is the work it performs.
I even played around with the idea of cooking my own to get out of this loop, but reading the specifications soon killed that idea. It would take a life time, probably be deprecated by the time, and still wouldn't work properly.
The new JSON-stuff honestly doesn't look much better from what I've seen. It seems to still be doing IMAP, only using JSON instead, which wasn't the problem. I'm not holding my breath about it becoming standard enough to depend on.
It's a mess, so much that I'm thinking it would probably be better to start over entirely.
- afiori 7y ago> The new JSON-stuff honestly doesn't look much better from what I've seen. It seems to still be doing IMAP, only using JSON instead, regarding JMAP that should not be the case. From their FAQ the intent is to make it easier to use already common workflows.
- codr7 7y agoI do hope you're right, convenient protocol access to email would change the game.
- jcranmer 7y agoJMAP fixes the big problems with IMAP: no MSN bookkeeping that no one uses anymore; no UIDVALIDITY issues; you can listen to events from multiple folders; etc. Essentially, the single biggest issue with IMAP is that most clients nowadays maintain an offline shadow copy of the database, and so what they need to do is use IMAP to synchronize these two databases. And IMAP is a lousy synchronization protocol--most of your IDs are all ephemeral. Extensions to IMAP make it better, but you can't rely on servers implementing them (or clients using them!). Incidentally, that's also why most library implementations of IMAP suck: you can't build a good interface that works around server deficiencies without baking in the integration into your database model, and that heavy opinionation makes it hard to use the IMAP code outside of the full email application.