I’m trying to update my company’s email filer extension from XUL to WebExtension and pretty much everything is broken. I’d like some advice on the best way forwards.
The purpose of the extension is to allow a user to save an email in Thunderbird onto the company file server as simply as possible. Select an email, check the filer’s guessed the right directory to save it in, click Save, Done. Easy. I get a text version of the email, and attachements are automatically saved in their own folder. In worked fine on Thunderbird version 60 or earlier, but now it doesn’t.
So, in summary, the old filer architecture was:
Awkward, but the only way I could see to make it work.
So, moving to WebExtensions, XUL is no longer a possibility, but I can use html instead. It’s a re-write of 1/4 of the app, but it’s an annoyance (and time), but not a showstopper.
I’ve considered some alternatives:
Firslt, one possibility would be to use native messaging and re-write the c++ app so, instead of having 10 or so different function, all calls are made through stdio. However, implementing a DLL over stdio strikes me as being akin to implementing IP over avian carriers (RFC1149).
Another alternative I’ve considered is to use indexedDB, but that doesn’t appear to be sharable across all users, which my database must be. If I could store it on the server where everyone can access then it would be a solution, and it would also simplify my code. However, it seems that indexedDB lives in the profile and can’t be moved, so it’s a non-starter.
A third alternative I’ve considered is to create a standalone email filing programme. Thunderbird will save the emails to a temp directory and launch the programme via native messaging, and them I’m free of WebExtension restrictions. However, I’d then have to parse .eml messages. A job for PyQt perhaps.
The final alternative, of course, is to use Outlook. This would mean a complete rewrite, but I may be looking at one of those anyway.
My questions are:
- Is there an alternative way of calling my DLL from within the WebExtension?
- Is there an alternative method of interfacing between a WebExtension and MySQL database?
- Are there any alternative architectures that I should consider?