Just so you know: you cannot make Gmail handle your attachments from the desktop. That's not possible. Why am I writing about this? Because I spent quite some time looking for an answer about this problem, and people in the forums weren't sure if it was even possible or not. Finally, in a Google help group, I read "No, you can't". So now you know.
It is indeed possible to set Gmail to be your default email client. On Windows and Mac OS, you can use gmail notifier, I don't know about all GNU/Linux distributions, but I know some ways to do it on Ubuntu. Here's one:
- First set firefox to use gmail as the mailto handler. Just follow the procedure found on the official Gmail blog
- Then on your desktop, go to System->Preferences->Preferred Applications, and set your email client to
firefox %s(or whatever browser you prefer).
That's it! Firefox will then process the mailto query and redirect you to a Gmail compose window, with the fields filled. Except the attachment field, unfortunately.
Note that there's a glitch though. With the command bzr send -mail-to email-adress from Bazaar, the query looks like mailto:///robert.smith@gmail.com which sets a wrong recipient in Gmail. I work around this by setting my preferred app to /path/to/myscript.sh %s with myscript.sh containing:
#!/bin/sh query=$(echo $1 | sed s,///,,) firefox "$query"
It is a bit surprising to see that Gmail can't handle attachments, since any desktop client do that perfectly. They read the attach or attachment field of the mailto query as a file path, and load that file. It appears that it's not a standard behavior, as the The mailto URL scheme [RFC 2368] never refers to anything such as a attach or attachment parameter.