Archive

Posts Tagged ‘perl’

GMail mailto: links in Linux with perl

July 22nd, 2006

So, I removed evolution today so it would stop trying to configure itself. Then, I went and found a perl script that would send me to a gmail compose page. Here’s the result:


#!/usr/bin/perl
# Open about:config
# Set the option "network.protocol-handler.external.mailto" to true
# Create the option "network.protocol-handler.app.mailto" and set it
# to ~/bin/mymailer.pl
use strict ;
my $link = $ARGV[0] ;
$link =~ /mailto:(.*)/ ;
exec "firefox \'http://gmail.google.com/gmail?view=cm&fs=1&tearoff=1&to=$1\'";

Works wonderfully! I’m so happy I found this.


Uncategorized , , ,