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.

pistoli

15 years ago

Would it be possible to automatically resize photos before sending them using imagemagik? It could even be a seperate menu item. I love the script.

Report

suslik

15 years ago

What a cool thing! Thx.

Report

flatpooks

15 years ago

:)

Report

polrus

15 years ago

this should be in kde by default i think

Report

janus-kde

15 years ago

There seems to be a problem with Python and my locale-settings:
[email protected]:~/.kde/bin> konqueror
QMultiInputContext::changeInputMethod(): index=0, slave=xim
QMultiInputContext::changeInputMethod(): index=0, slave=xim
konqueror: ERROR: Error in BrowserExtension::actionSlotMap(), unknown action : searchProvider
QMultiInputContext::changeInputMethod(): index=0, slave=xim
kdecore (KAction): WARNING: KActionCollection::KActionCollection( QObject *parent, const char *name, KInstance *instance)
kio (KMimeType): WARNING: KServiceType::offers : servicetype text/english not found
kio (KMimeType): WARNING: KServiceType::offers : servicetype text/english not found
Config file found in /home/thomas/.kde//share/config/emaildefaults
Config file found in /home/thomas/.kde//share/config/kdeglobals
Language options: ['']
Using language: en
Using email client: $(kde-config --prefix)/bin/kmail -s %s --body %B --attach %A
Traceback (most recent call last):
File "/home/thomas/.kde//bin/attach-to-email", line 136, in ?
encoding=locale.getdefaultlocale()[1]
File "/usr/lib/python2.2/locale.py", line 337, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.2/locale.py", line 271, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: [email protected]

Report

scido

16 years ago

hi, i tried to use this interesting plug-in, but i get an error:
Config file found in /home/scido/.kde//share/config/emaildefaults
Config file found in /home/scido/.kde//share/config/kdeglobals
Language options: ['it']
Using language: en
Using email client: $(kde-config --prefix)/bin/kmail -s %s --body %B --attach %A
Traceback (most recent call last):
File "/usr/bin/attach-to-email", line 135, in ?
executable=executable.encode(locale.getdefaultlocale()[1],"replace") #Find out what character encoding is being used and convert the string to that.
TypeError: encode() argument 1 must be string, not None

Can you help me?
Thanx
scido

Report

C

dschrader

16 years ago

Thanks for pointing this out. I hope that version 0.6.13 works for you.

Report

Lookanio

16 years ago

When I try attach file, I get message: Can't find '/usr/bin/attach-to-email %U' :-(
Script is installed in /usr/bin - of course.
Any help welcome. Thx in advance.

Report

C

dschrader

16 years ago

Try using version 0.6.12. If it still doesn't work, let us know! Thanks.

Report

Lookanio

16 years ago

Unfortunately still the same :-( BTW my distrib. is Mandrake 10.1 beta

Report

C

dschrader

16 years ago

What output do you get from the following:

ls -l $(kde-config --prefix)/bin/attach-to-email

cat $(kde-config --prefix)/share/apps/konqueror/servicemenus/attachToEmail.desktop | grep Exec

Report

Lookanio

16 years ago

I got the same outputs as upuaut, e.i.:
-rwxr-xr-x 1 root root 4848 sie 29 22:38 /usr/bin/attach-to-email*
and:
Exec=/usr/bin/attach-to-email %U

Local installation doesn't work, too :-(

Report

upuaut

16 years ago

Hi,

I did an global install with version 0.6.12.
First input: ls -l $(kde-config --prefix)/bin/attach-to-email
first output: -rwxr-xr-x 1 root root 4848 Aug 30 19:58 /usr/bin/attach-to-email*
the last (/usr/bin/attach-to-email*) shines green. I' dont know why :-0

second input: cat $(kde-config --prefix)/share/apps/konqueror/servicemenus/attachToEmail.desktop | grep Exec
second output: Exec=/usr/bin/attach-to-email %U

Just I said I'am using Mandrake 10.0 Official.
Thanks for your help.

Report

upuaut

16 years ago

Hi,

I did an global install.
First input: ls -l $(kde-config --prefix)/bin/attach-to-email
first output: -rwxr-xr-x 1 root root 4848 Aug 30 19:58 /usr/bin/attach-to-email*
the last (/usr/bin/attach-to-email*) shines green. I' dont know why :-0

second input: cat $(kde-config --prefix)/share/apps/konqueror/servicemenus/attachToEmail.desktop | grep Exec
second output: Exec=/usr/bin/attach-to-email %U

Just I said I'am using Mandrake 10.0 Official.
Thanks for your help.

Report

C

dschrader

16 years ago

Are you doing a global or local install?

Report

Lookanio

16 years ago

Global. Tomorrow I'll try local - perhaps it helps...

Report

upuaut

16 years ago

Hi,
I have the same problem. Using Mandrake 10.0 Official. Hope there is an answer...

Report

maf

16 years ago

Great service menu. very useful.
Is it possible to only show the filename in the body text of the created mail?

-if I send someone /home/maf/somepath/foo.pdf, can the body of the created email only say: Attached should be: foo.pdf
as the full path is not relevant once the file has left my machine.

I don't know python, or I would try it myself.

Report

C

dschrader

16 years ago

Just change the line (line 113 in version 0.6.11) that reads:

body+="\n\t%s" % (path)

to:

body+="\n\t%s" % (os.path.basename(path))

Report

maf

16 years ago

Thanks, works perfectly!

Report

guppetto

16 years ago

This script is great, but it has a behavior that is unexpected. If I have my mail client open and I attach an item to an email, after I press the send button, the script immediately kills my mail client. This would be a desired behavior if my mail client is not currently running. However, if I currently am using the client this should not occur. Perhaps you could check, via dcop, whether or not a mail client is currently running prior to adding the attachment. If so, the client would remain open. If no client is running then the script would launch the client and close it once the send signal is executed.

Report

C

dschrader

16 years ago

I'm assuming that you're using kmail based on your suggestion to use dcop. I use kmail, too, and I can't duplicate the same behavior. The script makes no assumptions about whether kmail is running. Kmail itself has code to make sure that only one instance of itself is running, but I can't see why it would close after you click send. What version of kde/kmail are you running?

Report

Kalna

16 years ago

Hey

I have just tested the new version 6.3.
It's all fine, but the text in subject and body, it's still English.
I can see in the python script that the translation is allright, so is me thats doing something wrong, or?

I have done a global install...

Report

C

dschrader

16 years ago

I think I see the reason for this; the script takes it for granted that you only have one language configured. If you have more than one, then it will not be able to parse it correctly and will fall back on English. I should have this fixed shortly. Thanks.

Report

markey

16 years ago

How does this belong on kde-look.org? Is it not rather meant to go to kde-apps.org?

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