Mailing files from Konqueror

Submitted by gunnar on
Question

I want to right click on one or more files in Konqueror and create a new mail with the files as attachments. Is this possible?

Answer

Yes, by creating a service menu entry.

In the directory .kde/share/apps/konqueror/servicemenus, relative to your home directory, create a file called sendto.desktop with the following contents:

[Desktop Entry]
Actions=SendToMailRcp
Encoding=UTF-8
ServiceTypes=all/allfiles
X-KDE-Priority=TopLevel
X-KDE-Submenu=Send To

[Desktop Action SendToMailRcp]
Name=Mail Recipient...
Exec=kmail --attach %F
Icon=kmail

This will add a new submenu to the context menu, with a single action. You can add more actions to send to other kinds of recipients, like in the example below where the desktop file has been extended to allow sending files to bluetooth devices:

[Desktop Entry]
Actions=SendToMailRcp;SendToBluetooth
Encoding=UTF-8
ServiceTypes=all/allfiles
X-KDE-Priority=TopLevel
X-KDE-Submenu=Send To

[Desktop Action SendToMailRcp]
Name=Mail Recipient...
Exec=kmail --attach %F
Icon=kmail

[Desktop Action SendToBluetooth]
Name=Bluetooth Device...
Exec=kbtobexclient %U
Icon=kdebluetooth

If you want these actions to be available to all users, you can place the desktop file in the directory /opt/kde3/share/apps/konqueror/servicemenus instead.