The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features
See the new ForumsYou need to be logged in to post in the forums. If you do not have an account, please sign up first.
How to Associate a Webmail with the 'mailto' Protocol
By default, you can goto "Ctrl + F12 -> advanced -> programs -> mailto -> edit -> use a webmail service" and associate mailto links with Yandex, Mail.ru or Fastmail.The default-provided handlers are specified in webmailproviders.ini in the "defaults" folder in Opera's program files folder. For example, "C:\Program Files (x86)\Opera\defaults\webmailproviders.ini".
To add a new entry to webmailproviders.ini, just edit it with a text editor and restart Opera. Follow the ID pattern and see the comments for the compose URI syntax. Before you do that though, you need to find/figure out the syntax for your webmail. Here is a short list (but note that is uses a different %key syntax that Opera, so you have to convert it). If your webmail is not there, you'll have to look around on the net for it, but note that not all webmails support this.
Note though that you need to have write access to webmailproviders.ini. If you don't, you can't edit it. Also note that this isn't meant to be a user-editable file and it will be overwritten when you upgrade Opera. You can try to set the file to read only to see if your changes will survive an upgrade.
However, if you just want mailto links in webpages to open in Gmail, just use the Gmail Compose extension.
Now, if you want mailto links anywhere in Opera (not just on web pages) to open in Gmail, you can use HTML5's registerProtocolHandler() by inserting this:
<script>
navigator.registerProtocolHandler("mailto", "https://mail.google.com/mail/?extsrc=mailto&url=%s", "Gmail");
</script>
in the mail.google.com page. You just view source of the page, insert the script tags and everything in it at the top of the source and apply changes. (Once you're all done, you need to reload the mail.google.com page to update it so your modified version is no longer used.)
Or, you can use this page to create a javascript URI of the code like this:
javascript:(function()%7Bnavigator.registerProtocolHandler(%22mailto%22%2C%20%22https%3A%2F%2Fmail.google.com%2Fmail%2F%3Fextsrc%3Dmailto%26url%3D%25s%22%2C%20%22Gmail%22)%3B%7D)()%3B
and paste that into the address field of the mail.google.com page and press enter.
Once you execute the JS code (either way), Opera will ask you if you want to associate Gmail with mailto. Tell Opera it's O.K.
Then, whenever you invoke a mailto link in Opera, it'll launch a dialog asking you what to do. You can then select "Gmail" and check "always use" so you're not asked again.
You can use this registerProtcolHandler() method for other webmails that support what registerProtocolHandler emits (really only Gmail, Fastmail and Yandex currently, and Squirrelmail 1.4.x with this).
Note that once webmails start supporting registerProtocolHandler, you won't have to do this yourself.
Note that if you don't see the notification bar at the top of the page when the Javascrtipt code is executed, the bar may be hidden for some reason. Just leave the page up, press "shift + F12" and goto "toolbars". Check "Show hidden toolbars while customizing", click the notification bar in question (you'll now which one it is) and set its placement to "Top".