Electron: Open default email client

安稳与你 提交于 2019-12-11 14:24:58

问题


I am using election framework to built .exe and .dmg files. In the app I have a button, clicking on which it must open default email application installed on the system to send an email. Following is the code to open email client

shell.openExternal("mailto:xyz@abc.com?subject=MySubject&body=");

But, it only works on few systems.

Note: It is already checked that other systems also have default email client. Is there any better way to do it. So, it will work on all system? Thanks in advance for providing help and your precious time !


回答1:


Unfortunately, the code shell.openExternal("mailto:xyz@abc.com?subject=MySubject&body="); only launches the MUA which is configured as the default in the system settings. Oftentimes in older version of windows there is no default mail client set and so it won’t work regardless.



来源:https://stackoverflow.com/questions/48556958/electron-open-default-email-client

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!