View Poll Results: Which e-mail client do you use most?

Voters
345. You may not vote on this poll
  • Gmail

    228 66.09%
  • Yahoo!

    32 9.28%
  • Hotmail

    22 6.38%
  • Desktop client-based (Evolution, Thunderbird, etc.)

    59 17.10%
  • Other (please post)

    4 1.16%
Page 1 of 5 123 ... LastLast
Results 1 to 10 of 49

Thread: How to make e-mail links launch Gmail, Yahoo! Mail, or other webmail

  1. #1
    Join Date
    Jun 2006
    Location
    Gwangju, Korea
    Beans
    3,479

    How to make e-mail links launch Gmail, Yahoo! Mail, or other webmail

    As a Gmail user, I was annoyed by Evolution or Thunderbird popping up every time I clicked on a mailto link. So, I wrote a set of scripts that make e-mail links open up in Gmail, instead. They also support Yahoo! Mail, Hotmail, Mail.com, Netscape Mail, Opera Mail, Horde, and Squirrel Mail. The scripts can be easily extended to use other webmail services. Note: I've only tested this with Gmail and Yahoo! Mail as they're the only two webmails that I have accounts with. Version 1.5 includes correct (I hope) support for Hotmail, thanks to ljungkvist.

    Firefox users should see the "Firefox Extensions" section below for alternative methods that you might prefer.

    For those of you who prefer German over English, sputnikrock has posted instructions in German.

    Installation

    Installation is simple. Note that I'm a Gnome user, so I'm not familiar with KDE or XFCE. If something doesn't work in your non-Gnome environment of choice, I probably don't know how to fix it, but I'd be glad to include your solution in this post (hint, hint).
    1. Download the attached file (gmail_link-1.5.tar.gz), extract it, and dump the files somewhere in your PATH. I suggest putting them in /usr/local/bin. (Note: In these instructions, I'm assuming that you're installing the files in /usr/local/bin. If you put them somewhere else, adjust the instructions accordingly.)
    2. Grab p-shortcut from my repository and install it. You can add my repo to /etc/apt/sources.list so that you'll automatically get any updates (see instructions on the site) or you can install just the p-shortcut deb. Note: You can forget about this dependency if you don't use the file gmail_link_select_browser. However, I'm not going to take the space to document that here.
    3. Make sure that each of the files is executable.
      Code:
      cd /usr/local/bin
      sudo chmod +x gmail_link*
    4. If you use a webmail provider other than Gmail (the default), see the section "Enabling Other Webmail Services" below.
    5. Gnome users: Launch System > Preferences > Preferred Applications and set the mail reader to Custom. Set the command to
      Code:
      gmail_link_select_browser "%s"
      Alternate method:
      1. Launch gconf-editor
        1. Go to Applications > System Tools > Configuration Editor (if there is no such menu item, enable it in System > Preferences > Menu Layout); or
        2. Hit <Alt>F2 and type gconf-editor; or
        3. Open up a terminal and type gconf-editor &

      2. In gconf-editor, navigate to /desktop/gnome/url-handlers/mailto and set the command key to gmail_link_select_browser "%s"

    6. KDE users: (Thanks to sputnikrock for this.) Launch System Settings > Default Applications and set the mail reader to Use a different client. Set the command to
      Code:
      gmail_link_select_browser "%s"
    7. Opera users (regardless of your desktop environment): Launch Opera and go to Tools > Preferences > Advanced > Programs. Set the mailto handler to
      Code:
      gmail_link %r opera
    8. Visit the mailto link test page to confirm that your webmail links are now working.

    Configuration

    General Configuration
    Let's look first at the configuration options in gmail_link_select_browser. Gecko-based browsers (Firefox, Epiphany, Galeon) all use the same gconf setting. That means that it isn't possible to find out which browser is in use when you click a mailto link (if I'm wrong about this--and I hope I am--please enlighten me).

    If you never have multiple browsers open simultaneously, all you have to do is make sure that any browsers you use are listed in the browserList variable in the first section of the file.

    If you do use multiple browsers at the same time, prioritize the browserList. The Gmail window will open in the first browser in the list that is currently running. This might not be the browser you're actually using due to the limitation explained above. So, you might want to adjust the order of the browsers. Note that links clicked in Opera will always open in Opera, regardless of this setting.

    Enabling Other Webmail Services
    Currently-Supported Webmail Services
    The file gmail_link contains support for multiple webmail services beginning with version 1.2. Switching services is simply a matter of finding the configuration section near the top of the file and uncommenting the appropriate service's formatString line. There are instructions in the file.

    Services Which Are Not Supported
    To enable a webmail service that isn't currently supported, you'll first need to determine the proper URL to use, and then set it in the configuration section of the file gmail_link. Technically-inclined users can see the comments there for instructions. Please post the fruits of your labors so that I can include additional webmail services in a future version of the script.

    If you're not technically inclined, fire up a browser on a computer that opens mailto links in your webmail of choice and visit the mailto links test page. Click on the E-mail 3 link and the E-mail 4 link and post the addresses of the pages that pop up. Then I (or someone) will format it properly and update the scripts.


    Browser notes

    Gecko-based Browsers (Firefox, Epiphany, Galeon, etc.)
    Links might not always open in the expected browser. See the General Configuration section above for details.

    Opera
    If you click a mailto link in Opera, it will always open in Opera--unlike Gecko-based browsers. There is no need to prioritize the browser list for Opera's sake.

    Konqueror
    This script works with Konqueror, but Gmail doesn't (as far as I can tell). If you use a webmail service other than Gmail, you can use this script--provided that you enable that service (see the Configuration section).

    To enable the script in Konqueror, start KDE's system settings program and choose Default Applications > Email Client. Check Use a different email client and enter
    Code:
    /path/to/gmail_link_select_browser
    I'm not a KDE user, so I don't know if this will have side-effects. KDE users, please enlighten me.


    Firefox Extensions

    Gmail Manager
    Thanks to liljoe76 for mentioning Gmail Manager. If you use Gmail and Firefox, it's quite a thorough solution. I've installed it alongside my script and disabled its mailto link option because I want to have mailto links work in all browsers, not just Firefox.

    WebmailCompose
    Yopnono pointed me to the Firefox extension WebmailCompose. It's another option if you use Firefox 1.5 or lower. I haven't tried it as I use Firefox 2.0.

    Pros
    • As a Firefox extension, links will always open up in Firefox.
    • Installation is presumably simpler.

    Cons
    • It appears to be abandonware; the last version was released 2005-09-16.
    • The Yahoo! Mail format string is incorrect, causing some links to work incorrectly. Other webmail services might have incorrect format strings, as well. (I've taken a number of format strings from WebmailCompose for use in my own script. While I've fixed the Yahoo! Mail string in my script, any errors in the other string are present in mine, as well, since I don't have accounts with the other providers to test with.)
    • WebmailCompose only works in Firefox; users of Epiphany, Opera, etc. will need a different solution.
    • WebmailCompose doesn't work in Firefox 2.0, the current version of Firefox. That means that Dapper users might be OK, but Edgy amd Feisty users are out of luck.

    Change Log
    • 1.5 (2008-06-11): Thanks to ljungkvist, Hotmail now works correctly (I hope).
    • 1.4 (unknown date, possibly 2008-02-14): Somehow, I missed updating this post for 1.4, and I have no change log entries for it. I believe it has something to do with supporting Google Apps mail, though, thanks to MountainX.
    • 1.3 (2007-06-04): I finally figured out how to fully support Opera. The file gmail_link_opera is no longer necessary.
    • 1.2 (2007-04-03): Added support for Yahoo! Mail, as well as several other webmail services that I haven't tested: Hotmail, Mail.com, Netscape Mail, Opera Mail, Horde, and Squirrel Mail.
    • 1.1 (2007-04-02): Added support for CC and BCC. I've never seen these kinds of links in the wild, but since they're theoretically possible, I support them. gmail_link should now support every kind of link supported by Gmail.
    • 1.0 (2007-04-01): Initial public release
    Attached Files Attached Files
    Last edited by mssever; June 11th, 2008 at 05:31 PM. Reason: New version

  2. #2
    Join Date
    Jun 2006
    Location
    Gwangju, Korea
    Beans
    3,479

    Re: How to make e-mail links launch Gmail (or other webmail)

    I've updated this script to support all the possible types of links (I hope).

    I'm hoping someone can supply the necessary info so that I can support Yahoo! Mail and Hotmail, as well.

  3. #3
    Join Date
    Sep 2005
    Beans
    762

    Re: How to make e-mail links launch Gmail (or other webmail)

    Or for Firefox you can use an add-on called WebmailCompose

  4. #4
    Join Date
    Jun 2006
    Location
    Gwangju, Korea
    Beans
    3,479

    Re: How to make e-mail links launch Gmail (or other webmail)

    Thanks for the mention. For some reason, I didn't find that extension while I was searching. Maybe it was because I used Gmail as one of my search terms. At any rate, I've released a new version and updated the thread to take advantage of the information.

    As I pointed out in my revised post, WebmailCompose works in some situations, but it's buggy and my scripts are much more versatile. If WebmailCompose works for you, great.

  5. #5
    Join Date
    Aug 2006
    Beans
    56
    Distro
    Ubuntu UMR

    Re: How to make e-mail links launch Gmail (or other webmail)

    not to, in any way 'dis' your script. but for firefox i use this extension.
    http://www.longfocus.com/firefox/gmanager/

  6. #6
    Join Date
    Jun 2006
    Location
    Gwangju, Korea
    Beans
    3,479

    Re: How to make e-mail links launch Gmail (or other webmail)

    Quote Originally Posted by liljoe76 View Post
    not to, in any way 'dis' your script. but for firefox i use this extension.
    http://www.longfocus.com/firefox/gmanager/
    Thanks for the link! For someone who only uses Firefox, it looks to be a better solution than my script. I've updated my post accordingly.

    However, because Gmail Manager only works in Firefox (and only with Gmail), my script still has its place.

  7. #7
    Join Date
    Oct 2005
    Location
    Oregon
    Beans
    97
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How to make e-mail links launch Gmail, Yahoo! Mail, or other webmail

    This is great! I got the script to work in Kubuntu Edgy. One (major) issue I haven't resolved is:

    How do I get Firefox to work with this script? Since it's technically a gnome (or gtk?) app, nothing happens when I click on a mailto link.. I don't have Kontact installed.

  8. #8
    Join Date
    Jun 2006
    Location
    Gwangju, Korea
    Beans
    3,479

    Re: How to make e-mail links launch Gmail, Yahoo! Mail, or other webmail

    Quote Originally Posted by sirlancelot View Post
    This is great! I got the script to work in Kubuntu Edgy. One (major) issue I haven't resolved is:

    How do I get Firefox to work with this script? Since it's technically a gnome (or gtk?) app, nothing happens when I click on a mailto link.. I don't have Kontact installed.
    In which browser did you get it to work? Konqueror?

    I'm not very familiar with KDE, so I don't know if my suggestions will be very helpful. First, do you have gconf-editor installed? It's part of GNOME, but you might have gotten it with some GNOME stuff sometime. If so, use it (see the instructions in the first post).

    Failing that, see if Firefox respects the method in my instructions for Konqueror.

    Otherwise, there must be some setting somewhere that will do the trick--unless the KDE philosophy expects programs to maintain all their own configuration.

    A final option if you use Gmail is to use the Gmail Manager Firefox extension mentioned in the first post.

    BTW: Firefox is actually an XUL app that someone made to look like a GNOME/GTK app.

  9. #9
    Join Date
    Jun 2006
    Location
    Gwangju, Korea
    Beans
    3,479

    Re: How to make e-mail links launch Gmail, Yahoo! Mail, or other webmail

    Big oops...

    I forgot to list a required dependency. Be sure to read step 3 of the first post for the dependency p-shortcut. If you only ever use Firefox, you probably wouldn't get bitten by this, but why take chances?

  10. #10
    Join Date
    Mar 2007
    Location
    BC, Canada
    Beans
    358
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: How to make e-mail links launch Gmail, Yahoo! Mail, or other webmail

    Great! This is nearly exactly what I was looking for. Is there a way to attach files as well?

Page 1 of 5 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •