Skip navigation.

exploreopera

| Help

Sign up | Help

Mailto-to-webmail

, , , ,

For those of you who've switched to using web-based mail, it might not be intuitive how to use links with "mailto:" URLs. You'll have to change the handling of mailto-links, to pass the address to a webmail service, instead of a mail application on your computer.

In Tools > Preferences > Advanced > Programs, select 'mailto' and press 'Edit'. Then use the command lines below to put in the 'Other application' field:

Note: for Opera 9.5, you need to enter the URL parameter in the parameter field.

GMail
opera "http://mail.google.com/mail/?view=cm&fs=1&to=%t&su=%s&body=%m&cc=%c&bcc=%b&ui=1"


Hotmail
opera "http://hotmail.msn.com/cgi-bin/compose?To=%t&Subject=%s&Body=%m&Cc=%c&mailto=1"


Yahoo Mail
opera "http://compose.mail.yahoo.com/?To=%t&Subject=%s&Body=%m&Cc=%c"


Netscape Mail
opera "http://webmail.netscape.com/compose.adp?mailto=%t&mailcc=%c&mailsubject=%s&mailbody=%m"


Mail.com
opera "http://mail01.mail.com/scripts/mail/Outblaze.mail?composeto=%t&subject=%s&body=%m&cc=%c&compose=1"


Opera Web Mail
opera "http://mymail.operamail.com/scripts/mail/Outblaze.mail?compose=1&did=1&a=1&to=%t&subject=%s&body=%m&cc=%c"


Horde
opera "http://YOUR_HordeURL_HERE.com/horde/imp/compose.php?popup=0&to=%t&cc=%c&msg=%m&subject=%s"


Squirrelmail
opera "http://YOUR_SquirrelURL_HERE.com/src/compose.php?send_to=%t&subject=%s&body=%m&send_to_cc=%c"


Generic
opera "http://YOUR_URL_HERE/?To_Field=%t&Subject_Field=%s&Body_Field=%m&Cc_FLield=%c"


Test: mailto-link
Button: toggle between M2 and webmail - in theory at least, this makes my Opera 9 crashy...

Top 150 Popular Firefox Extensions and OperaVive la France

Comments

avatar
Great, been looking for this :smile:

By PaiTrakt, # 11. July 2006, 14:36:37

avatar
Nice, but I love M2.

By FataL, # 11. July 2006, 17:33:05

avatar
Good one! However, I like Opera Mail client. It's very fast and very easy to use, properly integrated into the browser. It's very fast because it does work very, very well with over 12 000 (twelve thousands :smile: ) of emails.

By robodesign, # 11. July 2006, 19:36:47

avatar
Great, thanks, but I am stuck in a situation where I have to alternate between web-based mail and M2.

By yadavankur, # 13. July 2006, 06:28:34

avatar
Yadavankur: you could change the setting of course. The commandline will be remembered, no need to enter that again.

Maybe using a custom button to make it easy. I've added one to the post, but it tends to crash my copy of Opera - time to file a bug report for me!

Note that all this is of course only interesting if you encounter mailto-links a lot.

By Rijk, # 13. July 2006, 14:15:23

avatar
Any chance this will be included in an upcoming version of Opera? It could be put under a Webmail category in Mail and Chat Accounts, IMO.

P.S.: I really, really like your Twelve setup. Thank you for taking the time to make it. Browsing is so much easier. :cheers:

By rmccabe916, # 14. July 2006, 05:40:50

avatar
rijk, what if you have sevral mail accounts in Opera?
There is no way to handle this then... :frown:

By YtseJam, # 15. July 2006, 08:51:09

avatar
YtseJam: sure there is. Use the good old copy and paste method. 99% of these links only include the mail address, and Opera's context menu has nice options to copy this directly.

This is somewhat like asking why Opera can't be set up to use multiple external mailers.... If want to send mailto-links sometimes to Eudora and sometimes to Thunderbird, that also requires either copy and paste, or manually changing the setting before clicking the link.

By Rijk, # 15. July 2006, 23:26:57

avatar
So let me understand what you're saying: This isn't notification and retrieval application this only forwards us when clicking an e-mail link to web based mail. Nice but not good enough, even Outlook can retrieve mail from hotmail.

Copy+paste is from the field of DTP, surfing the net means seamlessly moving by clicking links. What you suggest is an improvisation.
Sorry :-(

By ProfSeuss, # 16. July 2006, 06:30:15

avatar
@ProfSeuss: Hotmail is a very special case, you are not talking about normal webmail or POP mail now. There are thirdparty tools to access Hotmail in Opera's mail client. This is needed for every non-Microsoft application.

By Rijk, # 16. July 2006, 14:14:08

avatar
I and other users have to use another browser because of Bi-di problems. As I expect Opera to solve the Bi-di problems I also expect it to fulfill the statement of all in one internet suite. If I have to use third-party tool it isn't all in one!

This is clearly not your fault and I'll refer this complaint to Opera developers.

By ProfSeuss, # 16. July 2006, 18:00:09

avatar
This doesn't appear to work on the Mac version. Can anyone confirm?

I say this because I can't manually edit the 'Other Application' field. I can only change it by selecting a file from my computer.

By MikeHaugland, # 20. July 2006, 05:16:11

avatar
thanks so much, found this in the forums. :smile:

By angel292005, # 17. September 2006, 02:08:43

avatar
To MikeHaugland...same problem here, and I got....close.

In Library/Preferences/Opera Preferences/ is a file called "Opera 9 Preferences". Shut down Opera, pop this file open in a text editor, search for the lines:

[Trusted Protocols]
itpc=0,0,
mailto=0,0,
telnet=0,0,telnet
tn3270=0,0,telnet

Paste in opera "http://mail.google.com/mail/?view=cm&fs=1&to=%t&su=%s&body=%b&cc=%c" to create:
mailto=0,0,opera "http://mail.google.com/mail/?view=cm&fs=1&to=%t&su=%s&body=%b&cc=%c"
(or whatever your webmail of choice is from the post above)

Close the file, open Opera, and the advanced/programs/mailto prefs should be updated, just as if you had typed it in. One minor detail: It still doesn't work! I get this error: Unable to start the external e-mail application
opera "http://mail.google.com/mail/?view=cm&fs=1&to=%t&su=%s&body=%b&cc=%c"

Anyway, here's hoping that perhaps there is a line in that file or some other file that I missed that will get this to work on Mac. Anybody? Please? Maybe?

Actually, what would be even better is if Opera could fix this on the Mac version. This isn't the only preferences field where this occurs. Edit Site Prefs / Display / My style sheet is another: it only lets you browse to a file, not type or paste in the field.

By adrian1234, # 26. January 2007, 06:48:39

avatar
Rijk thanks :D

By Nexus009, # 30. January 2007, 12:02:38

avatar
opera "http://mail.google.com/mail/?view=cm&tf=1&fs=1&to=%t&su=%s&body=%b&cc=%c"


If you add '&tf=1', it opens just the email to send. Once sent, the window/tab is closed. Without tf=1, after sending email you have a new gmail tab at your inbox.

By fearphage, # 4. February 2007, 22:49:45

avatar
Thanks fearphage, I'll update my posting.

By Rijk, # 4. February 2007, 22:56:12

avatar
Is there no bcc field?

By fearphage, # 5. February 2007, 00:47:35

avatar
Is it possible to include the web address into gmail compose email window when clicking on "send link by mail" via right click?

By AleksOD, # 9. February 2007, 13:50:32

avatar
Since the switch to yahoo beta, this command no longer works. At least it doesn't with opera for linux. I get a screen that says yahoo doesn't understand my browser request. I still use the old version of yahoo, because yahoo beta is too resource intesive for my computer. I have tried using the generic command too.

By _3147, # 21. February 2007, 14:42:11

avatar
Hyper Cool!

This should be in a Sticky in the forum.

By fdisk2k, # 21. March 2007, 00:24:40

avatar
there is also: mailto-gmail.user.js

By c1201298, # 5. April 2007, 10:05:10

avatar
This script looks strangely familiar. That is actually a step in the opposite direction though. Why run a script when it can be handled internally?

By fearphage, # 5. April 2007, 14:03:43

avatar
Great!
But how can I use the mail button on my keyboard launch gmail?

By drlaunch, # 1. May 2007, 13:00:28

avatar
Make the shorcut for the email button:
/path/to/opera/opera "http://mail.google.com/mail/?view=cm&fs=1&to=%t&su=%s&body=%b&cc=%c"

By fearphage, # 1. May 2007, 13:17:58

avatar
Seems like I couldn't make it work. Because I uninstalled my keyboard's software.

So I used TweakUI to change the path for the mail button to a shortcut I made. Works too.

By drlaunch, # 1. May 2007, 14:11:58

avatar
If you put -newpage between the opera command and the url it will open in a new tab.

By jonlandrum, # 15. June 2007, 01:39:57

avatar
How can I properly encode a url to make it work in the body? I've tried no encoding, encodeURIComponent, and escape. Here are my attempts variety of ways:

no encoding
escape()
encodeURIComponent()

This is the raw format:
mailto:?subject=Check+out+this+RSS+Feed&body=http://my.opera.com/desktopteam/xml/rss/blog/
I've tried switching between '&' and '&'.

For me, the result is the body parameter in the url (&body=) is empty and therefore the body of the email is empty. I'm using gmail.

By fearphage, # 24. June 2007, 17:05:22

avatar
This is because of a couple of conflicting help files.

http://www.opera.com/support/search/view/472/
and
http://www.opera.com/support/search/view/260/

The latter of which displays the right attributes. The body is actually %m. %b is BCC.

The correct setting for Gmail would be:
opera "http://mail.google.com/mail/?view=cm&fs=1&to=%t&su=%s&body=%m&cc=%c&tf=1"

One problem is that if the body contains escaped characters like %3D it will be unescaped to =, which will mess the body up sometimes anyway. For example this link will break the Gmail setting.
YouTube Sample
mailto:?subject=You%27ve%20received%20a%20YouTube%20Video%21&body=http%3A//www.youtube.com/watch%3Fv%3DzWG5Dl1IyF4

By VJgamer, # 3. August 2007, 21:06:04

avatar
Actually
opera "http://mail.google.com/mail/?view=cm&fs=1&tf=1&to=%t&su=%s&cc=%c&bcc=%b&body=%m"

You forgot to include '&bcc=%b' and I put body last since its most likely to be messed up. '%0A' is the convention for a newline in an email but it totally messes up in Opera.

Example:

all fields mailto
multiple recipientsThis works but the one above fails
broken subject

Code from examples above (in order):
mailto:a@mailinator.com,b@mailinator.com?cc=c@mailinator.com,d@mailinator.com&bcc=e@mailinator.com,f@mailinator.com&subject=test%20message&body=The%20message's%20first%20paragraph.%0A%0aSecond%20paragraph.%0A%0AThird%20Paragraph.

mailto:a@mailinator.com,b@mailinator.com

mailto:z@mailinator.com?subject=hi&body=The%20message's%20first%20paragraph.%0A%0aSecond%20paragraph.%0A%0AThird%20Paragraph.


I haven't filed any bugs because I haven't verified if this is an Opera issue or something to do with gmail. Anyone see similar issues with other mail providers?

By fearphage, # 5. August 2007, 21:59:56

avatar
Some mailto parsing bugs will be fixed in Kestrel, so I'd recommend waiting with filing bugs on it.

By Rijk, # 6. August 2007, 00:01:09

avatar
Didn't notice anyone mentioning the Mac (or Win) Gmail Notifier that enables these various functions:

o View inbox
o Compose mail
o Enables MAILTO links
o Notifies on new mail

Works well in the Kestrel builds.

By kamalesh, # 15. September 2007, 17:24:24

avatar
@kamalesh: broken link?

Yea, I was just noticing that this method is no longer functional in Opera. One or maybe the only problem is that Opera refuses to save the quotation marks around the parameters in the protocol edit dialog. So something with spaces in it opens a new tab for every space.

EDIT: When I initially opened this dialog, it seemed to improperly import my old settings.

It changed
opera "http://mail.google.com/mail/?view=cm&fs=1&tf=1&to=%t&su=%s&cc=%c&bcc=%b&body=%m"

to opera as the program and the parameter was
http://mail.google.com/mail/?view=cm&fs=1&tf=1&to=%t&su=%s&cc=%c&bcc=%b&body=%m""
Notice 0 quotation marks before the param and 2 at the end. I tried fixing this with 2 at the beginning and they are stipped away while the 2 at the end remain. 1 quotation mark at the beginning and the end causes both of them to be stripped away.

By fearphage, # 15. September 2007, 18:11:43

avatar
Excellent! Very helpful!!!

By samystic, # 15. September 2007, 19:55:06

avatar
I use hotmail. I followed the directions exactly, putting

http://hotmail.msn.com/cgi-bin/compose?To=%t&Subject=%s&Body=%b&Cc=%c&mailto=1

in the specified field, trying that URL both with and without quote marks, but when I click on an e-mail link, both the "Test: mailto-link" here and a link to my own e-mail, I get the follwing error message. What's wrong?

Unable to start the external e-mail application
http://hotmail.msn.com/cgi-bin/compose?To=Rufinoform1@hotmail.com&Subject=&Body=&Cc=&mailto=1

The system cannot find the file specified.

By Moonbarker Osbourne, # 2. October 2007, 22:27:47

avatar
You did not forget to add opera in front of the string, and have Opera as your default browser, right?

By Rijk, # 3. October 2007, 15:53:03

avatar
TOtally non-functional on Gmail these days, all I get is an Inbox tab.

By eblade, # 6. November 2007, 19:35:42

avatar
It also doesn't work with Opera [Kestrel beta] and the official Gmail Notifier.

By eblade, # 7. November 2007, 15:58:54

avatar
I found a way to make this work again, but I'm not sure if any personal info is revealed in the link I use, so I'd rather not post it until I can get a breakdown of what each value means, in particular the number appearing immediately after this: http://mail.google.com/mail/?ui=1&ik=

Any idea what "ik" is? As long as it's nothing personal, I'll post the link I've been using.

By Vague_Rant, # 8. November 2007, 08:34:49

avatar
OK, on further inspection, it seems the "ik" value is generated per-user, so my link won't help anyone else, anyway. Good luck.

By Vague_Rant, # 14. November 2007, 11:32:52

avatar
Try this to make it work after the latest GMail upgrade:

opera -newpage "http://mail.google.com/mail/?view=cm&fs=1&to=%t&ui=1"

By alanhoyle, # 27. November 2007, 21:57:25

avatar
@alanhoyle: looks like you can still add the other parameters as well, though 'body' will have no effect.
opera -newpage "http://mail.google.com/mail/?view=cm&fs=1&to=%t&su=%s&body=%b&cc=%c&ui=1"


For Opera 9.5, you need to use the parameter field for the parameter.

By Rijk, # 28. November 2007, 22:29:10

avatar
If you see my earlier post, the variable for body is actually %m.

%b = BCC
%c = CC
%m = Body (I assume m is for message!)
%s = Subject
%t = To

This mixup is because of a couple of conflicting help files.

http://www.opera.com/support/search/view/472/
and
http://www.opera.com/support/search/view/260/

The latter of which displays the correct variables.

I think it would be wise to update your tutorial.

By VJgamer, # 10. January 2008, 05:27:19

avatar
Oh dear... thanks VJGamer

By Rijk, # 10. January 2008, 23:02:25

avatar
Rijk, Is there anyway to have the knowledge base article (http://www.opera.com/support/search/view/472/) corrected?

By VJgamer, # 15. January 2008, 05:33:17

avatar
VJGamer: those parameters were true for Opera 6 for Linux, I'm not sure when it changed there to become unified with Opera for Windows. The article is listed as being specific for Linux (though you see that only on the list of articles, not on the page itself.

By Rijk, # 15. January 2008, 11:17:59

avatar
I just tried this using hotmail, but it doesn't work correctly. Opera opens hotmail in a new tab OK, but goes to the hotmail homepage rather than the 'compose message' page. Any thoughts? I'm using Opera 9.25, if it matters...

By dogred, # 22. January 2008, 05:04:56

avatar
Hey Rijik, I need some help. I'm using Opera 9.5 and Gmail. The mailto: works, except the link opens to a new Opera window with the tabs I have open.

Other than that thanks.

By jjulagay, # 6. March 2008, 19:12:10

avatar
You can use this method with Gmail's 2.0 interface if you install this userJS. Here's the code to use in the mailto dialog:

opera "http://mail.google.com/mail/?ui=2&nocheckbrowser&view=cm&fs=1&to=%t&su=%s&body=%m&cc=%c&bcc=%b"

By drlaunch, # 6. March 2008, 20:07:34

avatar
@jjulagay: this hack assumes you are opening mailto-links inside the Opera installation that is your default browser.

By Rijk, # 6. March 2008, 20:20:48

Write a comment

You must be logged in to write a comment. if you're not a registered member, please sign up.

July 2008
SMTWTFS
June 2008August 2008
12345
6789101112
13141516171819
20212223242526
2728293031