Bug 205572

Summary: Send file as attachment (xdg-email servicemenu in Dolphin)
Product: [I don't know] kde Reporter: Florian Hubold <doktor5000>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: wishlist CC: bugseforuns, de.meyer.maarten, dg, finex, nate, public
Priority: NOR    
Version: 4.2.4   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Florian Hubold 2009-08-29 12:51:59 UTC
Version:            (using KDE 4.2.4)
OS:                Linux
Installed from:    Mandriva RPMs

I'd like to see a servicemenu to be able to "Send file as e-mail attachment" from KDE file managers. There seem to be already some servicemenus for this, and krusader also is able to do this.

http://www.kde-look.org/content/show.php?content=11234
http://www.kde-apps.org/content/show.php/Thunderbird+Service+Menu?content=19328

But as far as i can see they are for a more specialised purpose, either bound to a particular mail client or using weird ways to achieve the goal.

This is my mockup for the servicemenu, it uses xdg-email to be desktop-agnostic and to use the email client which the user defined.



[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin,application/octet-stream
Actions=email-attachment;

[Desktop Action email-attachment]
Name=Send as E-Mail Attachment
Name[de]=Als E-Mail-Anhang versenden
Icon=message-rfc822
# syntax abstracted, needs to be worked out
Exec=xdg-email --attach filename


Would be nice to see this integrated into kdebase-workspace.
Comment 1 FiNeX 2009-09-13 19:12:03 UTC
*** Bug 171715 has been marked as a duplicate of this bug. ***
Comment 2 FiNeX 2009-09-13 19:12:27 UTC
If implemented it should be considered this: bug #107346 .
Comment 3 Donatas Glodenis 2009-11-25 10:14:54 UTC
Note that script xdg-email currently (in Kubuntu 9.10, version 1.0.2-6.1) has a bug: it (reportedly) works only if kde3 libraries (kdelibs4c2a) are installed, and if not, gives an error (my case). There is an upstream patch for that: https://bugs.freedesktop.org/show_bug.cgi?id=17268. I am also doubtful about kreadconfig use in the xdg-email script, for I cannot make it work, but maybe that is just me...
Comment 4 Alvise 2010-02-15 16:17:19 UTC
With dolphin under KDE SC4.4 additional service menus can be installed via KGHN.
I tried to install several of them, including "attach to email" service menu, but none of them seem to work atm
Comment 5 Maarten De Meyer 2013-05-11 15:28:10 UTC
If you install kmail it will add a servicemenu to send files as email.
This could easily be changed to call xdg-email instead of kmail directly.

BUT: it is currently not possible to send multiple attachments with xdg-email.
https://bugs.freedesktop.org/show_bug.cgi?id=50016

As long as this is not fixed it would be a regression to switch to xdg-email.
xdg-utils are bash scripts, if you are good at scripting take a shot at fixing it upstream!

I'm not closing this as upstream because we still have to change the Exec line.
Comment 6 fire f. 2018-06-13 08:03:38 UTC
[Desktop Entry]
Comment=Send this file as e-mail attachment
# place this file as   /home/YOU/.local/share/kservices5/ServiceMenus/sendmail.desktop

# kate: byte-order-marker off;
# source:  https://bugs.kde.org/show_bug.cgi?id=205572

Icon=claws-mail
# use Kate-plugin Icon-picker for Cuttlefish to choose an icon handily
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin,application/octet-stream,plain/text
Actions=email-attachment;

[Desktop Action email-attachment]
Name=send as e-Mail Attachment
Name[de]=Als E-Mail-Anhang versenden
Icon=message-rfc822
# syntax abstracted, needs to be worked out
Exec=xdg-email --attach %u 

#  xdg-email --attach /sample.txt --subject "no workie: returncode 0 = success, but thunderbird attaches no file!"
Comment 7 Nate Graham 2020-09-29 00:45:01 UTC
Dolphin now had this through the Purpose plugin, which provides the standard Share... menu.