Gentoo Wiki ArchivesGentoo Wiki

Mozilla_Thunderbird/Attach_files

Here is a small script that is able to attach more than one files on a new composed mail under thunderbird. This script is very simple so that people with no script knowledges could understand it. Some parts of the script comes from various sources.

First we create a file called attach_mail_service in /usr/local/bin You can of course name it anyway you want and place it wherever you want. Just make sure that you have permissions to run the script (we also make it executable).

#! /bin/bash
#
# Script created by ASID
# Attach files to thunderbird
temp="" count=0 for i in $* do count=$(( $count + 1 )) if [ $count -eq $# ] then temp=${temp}file://${i} else temp=${temp}file://${i}, fi done
if thunderbird -remote "ping()" 2> /dev/null ; then thunderbird -remote "xfeDoCommand(composeMessage,attachment='$temp')" else thunderbird --compose "attachment='$temp'" fi

The next step is to create the service menu. Name the following file AttachToThunderbirdMail.desktop or WhateverYouWant.desktop and place it in your ~/.kde/share/apps/konqueror/servicemenus/ directory. If the servicemenus directory does't exist, you can create it without fear.

[Desktop Entry]
Encoding=UTF-8
ServiceTypes=all/all
Actions=attachToEmail
[Desktop Action attachToEmail] Name=Attach to Mail Icon=attach Exec=/usr/local/bin/attach_mail_service %F

If you placed the 1st script in another directory, you must make the change also in the Exec command of the second file. Now, by changing the Name you change the text displayed under the Actions menu, when you right click on files. Finally you can customise it on your local language by adding Name[it]= if you are Italian, Name[el]= if you are Greek, etc, and writing the text you want to be displayed on you native language.

Hope you enjoy ;)

Weblink


TIP Attach files to Thunderbird - Gentoo forums

Retrieved from "http://www.gentoo-wiki.info/Mozilla_Thunderbird/Attach_files"

Last modified: Fri, 13 Jun 2008 23:25:00 +1000 Hits: 6,011

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.