How can I click an e-mail addres in firefox so that it opens a new mail for this recipient in thunderbird?

Problem

On ISG.EE managed workstation I cannot open a mailto-link in firefox to compose the mail in thunderbird. What can I do?

Solution

Crate a directory (if not present) named bin in your homefolder. Change to the newly created directory and create a file firefox-mailto-fix with the following content (Toggle line numbers to copy & paste!):

   1 #!/bin/bash
   2 # This script allows FireFox to send mailto: links
   3 # to Thunderbird
   4 
   5 PATH="/usr/sepp/bin:$PATH"
   6 
   7 THUNDERBIRD="thunderbird"
   8 THUNDERBIRD_REMOTE="thunderbird -remote"
   9 
  10 #echo "Firefox mailto: $*" >> $HOME/log.txt
  11 
  12 MAILTO_URL="$1"
  13 #Strip off the protocol as this confuses Thunderbird
  14 MAIL_DATA=`echo "$MAILTO_URL" | /bin/sed -s 's/^mailto://'`
  15 
  16 if $THUNDERBIRD_REMOTE 'ping()' ; then
  17     $THUNDERBIRD_REMOTE "mailto( $MAIL_DATA )"
  18 else
  19     #The mailto needs to be in the format mailto:someone@example.com
  20     #eg not mailto://someone@example.com
  21     $THUNDERBIRD -P default -compose "$MAILTO_URL"
  22 fi
  23 exit 0

Finally make the script you created executable, with chmod u+x firefox-mailto-fix.

Then open firefox and type about:config in the address bar, and create a new key network.protocol-handler.app.mailto with the value /home/$yourusername/bin/firefox-mailto-fix, where you should substitute $yourusername with your unix login name.

Make also sure the settings in the GConf Repository are also set to thunderbird. Open a Shell and enter the following commands

gconftool-2 -g /desktop/gnome/url-handlers/mailto/command
/usr/sepp/bin/thunderbird "%s"

gconftool-2 -g /desktop/gnome/url-handlers/mailto/enabled
true

If the Settings are different, correct them with the following commands

gconftool-2 -s /desktop/gnome/url-handlers/mailto/command '/usr/sepp/bin/thunderbird "%s"' --type string
gconftool-2 -s /desktop/gnome/url-handlers/mailto/enabled 'true' --type bool


CategoryMAIL

FAQ/FirefoxMailtoLinksInThunderbird (last edited 2018-11-23 17:19:56 by maegger)