On Friday 16 December 2005 8:35 am, Will Stephenson wrote:
On Tuesday 06 December 2005 01:57, Paul W. Abrahams wrote:
Firefox (like most browsers) has an option for sending a link. How can I get the link to be inserted into the message?
use "kfmclient exec %s" in Firefox's about:config network.protocol-handler.app.mailto key.
Explanation: Firefox just passes the whole mailto: url to the app it launches. KMail, if you launch it with "kmail mailto:foo@bar.org?subject=hello&bcc=frobozz@gue.net", doesn't parse the URL beyond the email address. kfmclient is a launcher for almost any kind of file or URL under KDE, it uses KDE magic to figure out what to do with the URL. For mailto's, it checks the mailer to use from kcontrol->KDE components->Component chooser->Email client and launches that. For kmail, it is smart enough to parse the URL and call KMail using --subject, --cc, --bcc command line options, using all the information from the mailto link in kmail's composer.
This also works with the Send link context menu item in Firefox.
All that makes perfect sense -- but it didn't work for me, even after restarting Firefox. I observed that the command line kfmclient exec mailto:?subject=hello creates an email message (under kmail) with subject "hello", but setting that very line as the value of network.protocol-handler.app.mailto just creates an empty message. That leads me to think that Firefox accepts only a single identifier as the value of network.protocol-handler.app.mailto and passes the mailto: url to that program. Anything else on the key line is ignored. Paul Paul