Open Bug 1707547 (imap-js) Opened 2 years ago Updated 6 months ago

[meta] implement IMAP in JavaScript


(MailNews Core :: Networking: IMAP, task)


(Not tracked)


(Reporter: mkmelin, Unassigned)


(Depends on 3 open bugs)


(Keywords: meta)

Depends on: 1762688
Depends on: 1762689
Depends on: 1762690

When re-implementing, please make sure to not follow the old interaction design of the C++ IMAP component, which was forced by limitations in XPCOM at this time 24 years ago.

  • C++ IMAP uses native OS threads to avoid blocking the UI. In today's JS, we can use await, which is far far easier to use. Threads caused all kinds of headaches, esp. when passing information, and when waiting for results.
  • C++ IMAP was driven by internal URLs. These are not the URLs you see in the web browser, but they used URLs as a kind of "async function callback", because XPCOM didn't have callback functions at the time when this IMAP component was designed. This URL-driven mechanism caused very very wierd and difficult call stacks that are very hard to follow and debug. Again, await solves the problem very nicely.
  • C++ IMAP returned the email message as URL, and the message is the URL response. In a new design, you would probably simply make an async function which returns the message as function result.
You need to log in before you can comment on or make changes to this bug.