Description: A very simple service menu script, to email one or more files with Thunderbird to any address or to a given address, which i assume is used as a "backup" space. The subject is automatically updated according to the attached files and, in case you choose to send to your specific email address, details about sending date, user and host are automatically added in the body.
There are other similar service menus around, but i wanted a script that allows to attach more than one file at one time and that automatically updates the subject line.
USAGE: pretty straightforward.. Just make the two .sh files executable (if necessary) and place them in a directory of your path, for example /home/YOUR_USERNAME/bin. Place the service menu file EmailWithThunderbird.desktop in /home/YOUR_USERNAME/.kde/share/apps/konqueror/servicemenus
IMPORTANT: In file EmailWithThunderbirdToMyAddress.sh, you need to specify your email address in to=.... (that is, where i wrote: YOUR_EMAIL_ADDRESS@DOMAIN.NAME)
Thanks fungs for the tip.
Actually xdg-email appears to be broken in the --attach option, at least on SuSE. I have the latest version installed on my system, which is OpenSuse 10.2, but there's no way to successfully attach any file, even when its filename contains no spaces or special chars. I tried with absolute paths, relative paths, single/double quotes, prefix file://. Nothing works. No error messages if the file exists (while i do get errors if the path is pointing to a non existing file).
All the other fields are correctly inserted into the default email client but i have no way to test the attachments...
I read about identical problems on the buglists of xdg-email so i guess its a well known bug.
There is a bug in the command line itself for thunderbird, that shows up whenever the filename of one of the attachments has a '-'. The problem persists even escaping the -. Debugging from the command line outputs the message "Warning: unrecognized command line flag - ".
Now, since this is a problem of 'thunderbird' command itself, it's kinda hard to trace and solve it. My service menu is simply invoking 'thunderbird' command and the issue is not unrelated to the service menu itself.
I'll look further into that and will post an update if i can solve.
Ratings & Comments
4 Comments
Works very well, thanks a lot :)
Please see the Portland projekt, especially xdg-email http://portland.freedesktop.org/wiki/
Thanks fungs for the tip. Actually xdg-email appears to be broken in the --attach option, at least on SuSE. I have the latest version installed on my system, which is OpenSuse 10.2, but there's no way to successfully attach any file, even when its filename contains no spaces or special chars. I tried with absolute paths, relative paths, single/double quotes, prefix file://. Nothing works. No error messages if the file exists (while i do get errors if the path is pointing to a non existing file). All the other fields are correctly inserted into the default email client but i have no way to test the attachments... I read about identical problems on the buglists of xdg-email so i guess its a well known bug.
There is a bug in the command line itself for thunderbird, that shows up whenever the filename of one of the attachments has a '-'. The problem persists even escaping the -. Debugging from the command line outputs the message "Warning: unrecognized command line flag - ". Now, since this is a problem of 'thunderbird' command itself, it's kinda hard to trace and solve it. My service menu is simply invoking 'thunderbird' command and the issue is not unrelated to the service menu itself. I'll look further into that and will post an update if i can solve.