How to automatically open mailto (email) links in a gmail compose mail tab in Google Chrome

The following perl script will automatically open mailto (email) links in a gmail compose mail tab in Google Chrome on Ubuntu. You'll need to install perl in order for this to work, 'sudo apt-get install perl' in the terminal (Applications > Accessories > Terminal). You set the script up under System > Preferences > Preferred Applications > under Mail Reader choose Custom and enter this in the command field, then close:
 perl -MURI::Escape -e '$to = shift;$to =~ s/^mailto://i;exec("google-chrome","https://mail.google.com/mail?view=cm&fs=1&tf=1&cmid=22&to=".URI::Escape::uri_escape($to) );' '%s'

No comments:

Post a Comment