Attach to Email Service Menu

Dolphin Service Menus

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5 .0
Description:

A service menu for Konqueror that works in conjunction with a python script to allow the user to select multiple files and add them as attachments to an email using whatever mail client is configured. If a directory is selected, then its contents will be attached to the email recursively.

To Install:
0) tar -jxf attach-to-email-servicemenu.tar.bz2

1) cd attach-to-email-servicemenu

2) ./install.sh --remove-old
#Get rid of previous installations.

3) ./install.sh [--global-install|--local-install]
#Depending on whether you want system-wide or not.

The Readme file included explains how to set this up for different email clients.
Last changelog:

13 years ago

0.7.5 New Italian translation by Giurerro.

0.7.4 New Russian translation by Kalimullin Arthur and completed French translation by LaFleche.

0.7.3 New German translation by Adrian Freihofer and partial French translation by LaFleche. Also added instructions for KMail.

0.7.2 New Hungarian translation by Paul Körössy, some minor cleaning, and instructions for Mozilla Thunderbird.

C

dschrader

16 years ago

It is on kde-apps.org. However, kde-look.org holds the servicemenu section in common with it.

Report

ronnieakl

16 years ago

New to Linux, and love it. I have Mandrake 9.2 and just downloaded attatch to e-mail. I have changed my settings in KDE for kmail to evolution /usr/bin/evolution but everytime i right click, it only brings up the client. Does anyone know of the full path that I need to put into the configuration?

Thanks in advance.

Report

C

dschrader

16 years ago

Check out
http://bugzilla.ximian.com/show_bug.cgi?id=28765
for more information.

Report

Netizen

16 years ago

I experienced the same problem, but I got the impression that this program was specifically for KMail. Would also like an answer... since Evolution is a much better program than the bubble-gum version: KMail.

Report

vide

16 years ago

First thing: Evolution should be compared to Kontact, not KMail
Second thing: ROTFL

Report

WeeImp

16 years ago

I've installed this, both locally and globally - and both times, get the same error message.

When I right click, I see the option to attach to an email under actions. When I click that, I get:

'/home/weeimp/.kde//bin/attach-to-email %U'

But the program is there :) I'm thinking the program can't locate kmail?

I tried running it from the command line, and I get this error:
*********************
Traceback (most recent call last):
File "./attach-to-email", line 74, in ?
if value!="" and not os.path.samefile("%s/bin/kmail" % kdeprefix,value):
File "/usr/lib/python2.2/posixpath.py", line 208, in samefile
s2 = os.stat(f2)
OSError: [Errno 2] No such file or directory: 'kmail'
*************************

But I'm not a programmer, and not sure what to make of it. Kmail is certainly present on my system, in /usr/bin/kmail

Any ideas? Should I try changing the script somewhere?

Thanks! This looks good, if I can get it to work!

Report

WeeImp

16 years ago

Hmmm.. well, as I said, I'm not a programmer, but I'm willing to experiment and try things :)

Anyhow, I commented out lines 74 and 75 just to see what would happen, ie:

************
#if value!="" and not os.path.samefile("%s/bin/kmail" % kdeprefix,value):
# emailclient=value
*************

and now it works!
*shrug*... I have no idea why... it was just a hunch.

Report

C

dschrader

16 years ago

Thanks for pointing this out. I think I fixed it in this next release.

Report

C

dschrader

16 years ago

Thanks for the translation; I added it.

I prefer full path names because it shows the directory structure, but I can see how that might be a security issue for some. It's a really simple change to make, though.

Report

pio

16 years ago

Hi. You could use this in spanish:
Attach to email: Enviar por correo
Attached files: Incluye archivos
Attached should be: Este correo debe incluir los archivos:

I think that was all. One more thing, you could os.path.basename(path) to avoid showing the full path in the list of files. I think that would be safer.

Thanks for your great job.

Report

mipmip

16 years ago

When the directory "servicemenus' not exits which will occur when a user never played before with servicemenu. The install script gives an error instead of trying to create it first.

Report

SunWind

16 years ago

That's cool!=)

Report

Flameeyes

16 years ago

I have created a kde-service-menus ebuild in my ebuildpack, and from version 20040508 it installs this service menus.
Can be downloaded from http://flameeyes.web.ctonet.it/

Report

mipmip

16 years ago

Thanks for your new release with fixes for every problem I had.

I have tested every option and everything works out of the box now on my debian install. I now use the non-root installation.

Report

Spokke

16 years ago

Very useful tools :)

It work very good for me !

Many tnks

Spk

Report

poison

16 years ago

why isn't this in the standard KDE distribution ? should be possible with with a simple bash script so no onebody needs python installed ?

Report

shock66

16 years ago

If you run the install.sh without having your KDEDIR set, you get an error. Maybe that's why the above guy is getting the problem b/c then you don't get the .desktop item.

Either set the KDEDIR var or (more easily) edit the install.sh and set the correct path to your servicemenus.

Report

shock66

16 years ago

Yeah, never mind, I'm a little slow today. That's what Jetlag does :) Didn't see the + sign next to all the other comments.

To clarify for others who just might be as slow as me, the script referred to where you need to replace the $KDEDIR is the actual script (not the install script or the .desktop entry) located at /usr/local/bin called multiple-attachments-servicemenu

Good luck and may you not be as thick as I am...

Report

knex

16 years ago

no adds, no scripts :)
cat /usr/share/apps/konqueror/servicemenus/attachToKmail.desktop
[Desktop Entry]
ServiceTypes=all/all
Actions=attachToKmail

[Desktop Action attachToEmail]
Name=Attach to email
Name[en]=E-Mail this file
Icon=attach
Exec=kmail --attach

Report

C

dschrader

16 years ago

[Desktop Entry]
ServiceTypes=all/all
Actions=attachToKmail

[Desktop Action attachToKmail]
Name=Attach to Kmail
Icon=attach
Exec=kmail --attach %U

That's fine if you always want to use kmail, don't select directories, and don't select filenames like "/home/user/file%20name" that kmail will interpret as http encoding even though it's local.

Report

jayenell

16 years ago

I don't agree, except for the directories and %'s in the filename. On the other hand; who will send a complete directory, without gzip it? ...and %'s must always be avoided.

I use the following servicemenu-action (filemname = sendto.desktop) since kde 3.2 beta:

[Desktop Entry]
ServiceTypes=all/allfiles
Actions=sendfileto

[Desktop Action sendfileto]
Name=Send this file as an e-mail attachment
Name[en]=Send this file as an e-mail attachment
Name[nl]=Verzend dit bestand als e-mail bijlage
Icon=kmail
Exec=kmail --attach %U

The last line can easily be changed to e.g. evolution.

The %U makes it possible to select multiple files and I have NO problems adding files with spaces in their filename.

Cheers,

J

Report

shuehne

16 years ago

Hi,
this would be a service i have waited for.
Running script from command line works just perfect :-)
But I get no action from the service menu :-(
Any idea?

Report

C

dschrader

16 years ago

So, you can type:

/usr/local/bin/multiple-attachments-servicemenu /path/to/file

but not right-click on /path/to/file and select Attach to Email?

That's very odd considering that the servicemenu just calls the script outright. The only thing that I could think of would be that the servicemenu didn't end up in the right directory (i.e. $KDEDIR/share/apps/konqueror/servicemenus/).

Report

shuehne

16 years ago

The servicemenu entry is there. But when I select it just nothing happens - well there seems to open something for a split-second. And when I remove the script, I get an error message from the service menu. So installation seems ok.
It's even more crazy: When I start konqueror from within a shell (Konsole/xterm) I see the output from the script and everything works just fine... :-/
I am not sure if it is connected with this problem. But clicking in konqueror on a shell-script executes the script. clicking on a python/perl/...-script opens it in kwrite. But I couldn't find any difference in the setup for these mimetypes.

Report

C

dschrader

16 years ago

Forgot to mention earlier, by the way, whether or not konqueror executes scripts on double click is irrelevant to the problem since the service menu should just execute the script, and if the script works, then...

Report

13 years ago

0.7.5 New Italian translation by Giurerro.

0.7.4 New Russian translation by Kalimullin Arthur and completed French translation by LaFleche.

0.7.3 New German translation by Adrian Freihofer and partial French translation by LaFleche. Also added instructions for KMail.

0.7.2 New Hungarian translation by Paul Körössy, some minor cleaning, and instructions for Mozilla Thunderbird.

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.7.5
updated Oct 30 2006
added Mar 06 2004
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0
System Tags addon