1

In the desktop environment I can choose any of a number of installed email clients the 'preferred application' to read and send email, by linking the clients associated executable file.

Is there a method to set my webmail's 'composer' page as the executable?

i.e. when I click a email address link on a webpage in my browser, my system would usually run an email client, opening the composer with the said email address pre-typed.

What I would like to do, is to click a email address link in the browser, and it open up a new tab to http://webmail.com/composerpage

Do I need to set the webpage as an executable, and if so, how!?

All help appreciated.

  • Debian Edu 10
andersj
  • 41
  • 4

1 Answers1

0

To save all the hassle, I would highly recommend adding your webmail mailbox as IMAP to a mail client locally.

That being said, there are are few ways to go about this.

1 - Follow this guide on askubuntu

replacing https://mail.google.com/mail?view=cm&tf=0&to=echo $1 | sed 's/mailto://' with your webmail address. e.g: http://webmail.com/composerpage?to=echo $1 | sed 's/mailto://'

Whether your webmail address can handle the to argument or not is another question however. I would look into documentation of your webmail client, or try manually putting a [email protected] in the url when visiting your webmail

Note: this method assumes you're using thunderbird and firefox as your default mail and web clients respectively.

2 - Setting an app as an executable, setting that app as your default mail client

There's a couple ways of doing so, but the easiest in my experience is using Nativefier which uses electron

an example command you'd use to set up the app is:

mkdir ~/app
nativefier -n webmail http://webmail.com/composerpage --internal-urls ".*?\.webmail.com\.*?" --basic-auth-username username --basic-auth-password password ~/app
  1. you can then open your mail client via it's own app

  2. You can then change your default mail client in firefox

  3. Click the menu button and select options

  4. In the General panel, go to the Applications section.

  5. Search for the Content Type mailto and select it.

  6. Click on the Action column in the mailto row to change the action.

  7. select Use other...

  8. enter /home/<user>/app/webmail-linux-x64/webmail

This method however won't populate the to field unfortunately. You could build the app using electron manually to accept a to argument

3 using a browser plugin to change mailto functionality

I can only find a chrome extension that looks to do the trick but cannot vouch for it: https://chrome.google.com/webstore/detail/mailto/gppbppehiogfokmpligejhaepeopajdf?hl=en-GB

note that using a third-party plugin does pose it's security risks so I would avoid this option if possible.

RobotJohnny
  • 1,021
  • 8
  • 18