Comments (15)
According to this discussion this seems pretty easy to implement, at least on MacOS.
To open a prefilled composer on the protonmail web client you can do this
var injector = window.angular.element(document).injector()
var root = injector.get("$rootScope")
var messageModel = injector.get("messageModel")
let composeWithMessage = (message) => root.$emit("composer.new", { "type": "new", "data": {"message": message} })
let compose = (toAddress, subject, body) => {
let message = messageModel()
message.Subject = subject
message.AutoSaveContacts = 0;
message.ToList = [{ Address: toAddress, Name: toAddress }]
message.setDecryptedBody(body)
composeWithMessage(message)
}
compose("[email protected]", "Testsubjects wanted", "We want your dead body")
Would you be willing to give it a try? Otherwise I could also try to implement this and drop you a PR if you want to, which would probably take some time though.
from electronmail.
@heilerich if you will be considering adding a holistic implementation, mailto URL scheme handling would be the starting point. There will be a need to actually verify that it works on Win 7/8/10, Linux (at least Ubuntu recent + Arch) and macOS. This presumably might be a time-consuming task. By the way, Tutanota's desktop app seems to have some hacks for Windows. The remaining stuff I think I could help with or handle completely, including testing.
from electronmail.
It's unlikely to come in the near future.
from electronmail.
Same issue. I am not able to set as default app in Linux / Ubuntu / Gnome-shell
from electronmail.
In general, the task consists of two parts:
- First is the integration with the system complete and robust implementation of which might be tricky especially on Windows (there most likely will be a need to directly mess with a Windows Registry). So the implementation might look sophisticated and will require testing on Windows 7-8-10, Linux and macOS. This is more like a one-off task though.
- The second part is opening a prefilled composer, ie the integration with prepackaged official web clients (like the above-shown AngularJS code snippet). This part increases the maintenance burden.
Would you be willing to give it a try?
I'm not planning to jump into the task yet.
Otherwise I could also try to implement this and drop you a PR if you want to, which would probably take some time though.
As I pointed out adding the feature will increase the maintenance burden. Any web client update could potentially break the functionality so if at least the integration with the web clients code layer will be covered by automated tests then I will accept the PR. Alternatively, if you only need this working on macOS, don't want to deal with tests, etc, you could fork the project, add the change, hook the project up with the CI system and get your own installation package as an outcome.
There also will be an in-between task - showing a list with added to the program accounts, and only having the specific account selected the opening a prefilled composer action will kick in.
from electronmail.
Thanks for the quick reply! I will look into how much effort this will take and reconsider if I am willing to do this for everyone or just me.
Regarding your first point, the registration of the URL scheme, I don't think we need to implement this ourselves (and mess with the Windows Registry and such) as it seems the Electron framework has already taken care of this. There's an API for registering, unregistering and checking default url scheme handlers with the OS.
if at least the integration with the web clients code layer will be covered by automated tests
Could you point me to the sources of the specific tests for the existing web clients for a reference? I searched real quick and couldn't find anything.
Also, would you insist on tutanota support?
from electronmail.
Electron framework has already taken care of this
I've looked into this topic before. Electron handles the need but the implementation is not complete this is why some hacks expected to be needed.
Could you point me to the sources of the specific tests for the existing web clients for a reference? I searched real quick and couldn't find anything.
There are no tests implemented specifically for preload scripts or web clients. Could be Spectron-based, the example is here. Besides I think, depending on the implementation a custom fixture-like page with prepared web client + app custom/integration logic could be loaded and executed using karma runner.
from electronmail.
Also, would you insist on tutanota support?
Nope as tutanota support is already deprecated and going to be removed at some point.
from electronmail.
With the recent rebase onto Electron 9.0.0-beta.5 is has url scheme handling been improved?
from electronmail.
Nothing new was done in the app code in regard to handling mailto scheme.
from electronmail.
Same issue. I am not able to set as default app in Linux / Ubuntu / Gnome-shell
It can already handle mailto
links on a webpage atleast on Linux this is easier (Arch/Xfce), just not the direct compose box...
from electronmail.
is this still pending changes to electron or considered a will not do?
from electronmail.
I would like to see this functioning as well.
from electronmail.
yeah i agree this'd be a pretty convenient feature to have
from electronmail.
It would be great. The tutanota appimage handles it perfectly. It also works with attachments right from the dolphin file manager.
from electronmail.
Related Issues (20)
- Build error, occurs on tag v5.2.2 only HOT 1
- Windows 11 refuses to show notifications. HOT 2
- Will the development of electronmail continue, despite the upcoming official proton desktop client ? HOT 1
- ElectronMail window flickers on Windows 11 HOT 3
- Messages are no longer displayed HOT 1
- Android version of the application HOT 1
- Tor does not protect our IP address and is revealed with a webRTC leak HOT 10
- The app refuses to save more than one "proton-session" cookies records set HOT 2
- Maybe this is outside of the scope, but ability to access new web app of Proton Pass? HOT 1
- Can't open web links from e-mails in default browser HOT 8
- Windows 7 CRACK for v. 5.2.2 HOT 4
- [Bug] Drive: unable to download files that ask for location before download (large files) HOT 4
- problem with loading font in system dialogs HOT 3
- [FR] Use NativeMessaging for KeePassXC integration
- I am confused on how to do the code for recovering my proton mail password HOT 21
- Proton Mail has received official Windows client HOT 3
- Calendar side bar, no network connection HOT 1
- @taivlam for the mpr PKGBUILD HOT 2
- [Feature Request] Add Touch ID Support to MacOS App
- Minimize with ⌘+M on MacOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electronmail.