danwaineo
24th July 2007, 01:16 AM
I couldn't find a similar how-to on this site, so I thought I would make my own. This will let you pop up a browser with a compose window (email address and subject filled in!) using either gmail or yahoo mail. I use gnome with firefox, so these instructions may not be applicable for KDE or some other browser.
Go to System-->Preferences-->Preferred Applications
Under "Mail Reader" change from evolution to "Custom". Then type the following below it:
/home/dan/open_mailto.sh %s
Change "dan" to whatever is appropriate for you.
Now you'll need to create the open_mailto.sh file. For Yahoo:
#!/bin/sh
FIREFOX=$(which firefox)
URL=$(echo $1 | sed 's#mailto:##;s#?#\&#;s#\&subject=#\&Subj=#;s#(##;s#)##i;')
$FIREFOX -remote "openurl(http://us.f368.mail.yahoo.com/ym/Compose?To=$URL)"
For gmail:
#!/bin/sh
FIREFOX=$(which firefox)
URL=$(echo $1 | sed 's#mailto:##;s#?#\&#;s#\&subject=#\&su=#;s#(##;s#)##i;')
$FIREFOX -remote "openurl(https://mail.google.com/mail?view=cm&tf=0&to=$URL)"
Then:
$ chmod +x open_mailto.sh
A couple of notes:
1. The source of much of the information here is from this site:
http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-20039
2. The yahoo domain will change depending on your location, email address, etc. Change it to whatever works for you.
3. I've stripped the "(" and ")" characters because they were messing things up. This came up when responding to craiglist listings.
Hope this helps someone!
-Dan
Go to System-->Preferences-->Preferred Applications
Under "Mail Reader" change from evolution to "Custom". Then type the following below it:
/home/dan/open_mailto.sh %s
Change "dan" to whatever is appropriate for you.
Now you'll need to create the open_mailto.sh file. For Yahoo:
#!/bin/sh
FIREFOX=$(which firefox)
URL=$(echo $1 | sed 's#mailto:##;s#?#\&#;s#\&subject=#\&Subj=#;s#(##;s#)##i;')
$FIREFOX -remote "openurl(http://us.f368.mail.yahoo.com/ym/Compose?To=$URL)"
For gmail:
#!/bin/sh
FIREFOX=$(which firefox)
URL=$(echo $1 | sed 's#mailto:##;s#?#\&#;s#\&subject=#\&su=#;s#(##;s#)##i;')
$FIREFOX -remote "openurl(https://mail.google.com/mail?view=cm&tf=0&to=$URL)"
Then:
$ chmod +x open_mailto.sh
A couple of notes:
1. The source of much of the information here is from this site:
http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-20039
2. The yahoo domain will change depending on your location, email address, etc. Change it to whatever works for you.
3. I've stripped the "(" and ")" characters because they were messing things up. This came up when responding to craiglist listings.
Hope this helps someone!
-Dan