NewMail Execute  NewMail Execute


Download:
 newmailexecute0_1_16.xpi
(12 KB | sha256sum | installation instructions)

This extension observes your mail-folders and and runs an executable of your choice whenever new messages arrive.

Thunderbird's built-in-functionality only lets you play a WAV-sound and/or display an alert.
Using this extension you now can invoke any external program or script which can perform any action you like.

These actions could be:
  • show a special notification-window
  • control an LCD
  • play sound-files of any format
  • etc.
"NewMail Execute" also passes the folder's name (which triggered the execution) to the external program as an argument.

Using the options-dialog of the extension you can set the executable of your choice and enter any additional arguments which shall be passed; please check the "Screenshots"-section on this page.
As you may have already guessed, the variable called %folder% will be replaced with the folder's name that triggered the execution.
BTW… the path to your executable may also contain the special "Directory Variables" which I already explained for my Signature Switch-extension.

Also check the "Examples"-section on this page for more details.
v0.1.16 (2015-12-12)
  • added [sl-SL] locale
  • bumped maxVersion to 38.*
v0.1.15 (2015-03-04)
  • bumped maxVersion to 31.*
v0.1.14 (2013-09-08)
  • bumped maxVersion to 24.*
v0.1.13 (2012-11-04)
  • bumped maxVersion to 16.*
v0.1.12 (2011-12-14)
  • bumped maxVersion to 8.*
v0.1.11 (2011-10-01)
  • bumped maxVersion to 7.*
v0.1.10 (2011-08-18)
  • bumped maxVersion to 6.*
v0.1.9 (2011-06-21)
  • bumped maxVersion to 5.*
v0.1.8 (2010-07-08)
  • necessary adjustments to ensure 3.1-compatibility (chrome.manifest)
v0.1.7 (2010-01-24)
  • changed maxVersion to 3.2a1pre
v0.1.6 (2009-04-28)
  • bumped maxVersion to 3.1a1pre
v0.1.5 (2008-12-14)
  • bumped maxVersion to 3.0b1
v0.1.4 (2008-04-22)
  • changed maxVersion to 3.0a1
v0.1.3 (2008-03-06)
  • reorganization of code-structure
v0.1.2 (2007-04-10)
  • changed maxVersion to 2.0.0.* due to yesterday's release of TB2.0rc1
v0.1.1 (2007-01-23)
  • changed maxVersion to 2.0b2
v0.1 (2006-01-25)
  • initial release
My original motivation for writing this extension was that Thunderbird's WAVE-output somehow sounded a bit crappy on my Linux-system; and therefore I had to turn it off. (ALSA plays fine on my machine, but the Mozilla-Core seems to use the OSS-API to play sound.)
So I had to find a way to get my sound-notification back. ;-)

Besides I thought it would be great if you had different sound-notifications for the different persons sending you emails.

So here you have the shell-script which does all the magic for me:

#!/bin/bash

# retrieve the folder that triggered the execution
folder=$1

# set the sound-file according to the folders's name
if [ $folder = "MozExt" ]; then
   sound="chewbacca_roar.wav"
elif [ $folder = "Sean" ]; then
   sound="bart_ayecaramba.wav"
elif [ $folder = "Colleagues" ]; then
   sound="cartman_respectauthority.wav"
else
   sound="eudora-sound.wav"
fi

# play the sound using "alsa-play"
aplay /home/achim/Mozilla/thunderbird/misc/${sound} &

# display a notification window for 5 seconds
(sleep 1s; echo 20; sleep 1s; echo 40; sleep 1s; echo 60; sleep 1s; echo 80; sleep 1s; echo 100;) | \
    zenity \
    --title "Thunderbird Notification" \
    --window-icon /home/achim/Mozilla/thunderbird/misc/mail.png \
    --progress \
    --text "\"${folder}\" has new mail!" \
    --percentage=0 \
    --auto-close &