Mailto-to-webmail

, , , ,

[2008-09-26: updated to better show way to do this in 9.5]

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'. Enter 'opera' in the 'other application' field. Then use the addresses below to put in the 'Parameter' field:

Note: in Opera 9.2, you put both together in the single field, as in 'opera "http://etc"' (without the single quotes).

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


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


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


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


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


Opera Web Mail
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
http://YOUR_SquirrelURL_HERE.com/src/compose.php?send_to=%t&subject=%s&body=%m&send_to_cc=%c


Generic
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

PaiTrakt Tuesday, July 11, 2006 2:36:37 PM

Great, been looking for this smile

FataL Tuesday, July 11, 2006 5:33:05 PM

Nice, but I love M2.

Mihai Sucanrobodesign Tuesday, July 11, 2006 7:36:47 PM

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.

Ankuryadavankur Thursday, July 13, 2006 6:28:34 AM

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

Rijk Thursday, July 13, 2006 2:15:23 PM

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.

Ryan McCabermccabe916 Friday, July 14, 2006 5:40:50 AM

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

Idan AdarYtseJam Saturday, July 15, 2006 8:51:09 AM

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

Rijk Saturday, July 15, 2006 11:26:57 PM

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.

Naftali GuttmanProfSeuss Sunday, July 16, 2006 6:30:15 AM

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 :-(

Rijk Sunday, July 16, 2006 2:14:08 PM

@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.

Naftali GuttmanProfSeuss Sunday, July 16, 2006 6:00:09 PM

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.

MikeHaugland Thursday, July 20, 2006 5:16:11 AM

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.

Sarah angel292005 Sunday, September 17, 2006 2:08:43 AM

thanks so much, found this in the forums. smile

adrianadrian1234 Friday, January 26, 2007 6:48:39 AM

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.

Nexus009 Tuesday, January 30, 2007 12:02:38 PM

Rijk thanks bigsmile

MyOpera team, please fix this!fearphage Sunday, February 4, 2007 10:49:45 PM

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.

Rijk Sunday, February 4, 2007 10:56:12 PM

Thanks fearphage, I'll update my posting.

MyOpera team, please fix this!fearphage Monday, February 5, 2007 12:47:35 AM

Is there no bcc field?

Alexodius PrimeAleksOD Friday, February 9, 2007 1:50:32 PM

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

Jenn_3147 Wednesday, February 21, 2007 2:42:11 PM

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.

fdisk2k Wednesday, March 21, 2007 12:24:40 AM

Hyper Cool!

This should be in a Sticky in the forum.

Pawelc1201298 Thursday, April 5, 2007 10:05:10 AM

there is also: mailto-gmail.user.js

MyOpera team, please fix this!fearphage Thursday, April 5, 2007 2:03:43 PM

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?

Knut Remi "DrLaunch" Løvlidrlaunch Tuesday, May 1, 2007 1:00:28 PM

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

MyOpera team, please fix this!fearphage Tuesday, May 1, 2007 1:17:58 PM

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"

Knut Remi "DrLaunch" Løvlidrlaunch Tuesday, May 1, 2007 2:11:58 PM

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.

jonlandrum Friday, June 15, 2007 1:39:57 AM

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

MyOpera team, please fix this!fearphage Sunday, June 24, 2007 5:05:22 PM

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.

Timothy ConnerVJgamer Friday, August 3, 2007 9:06:04 PM

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

MyOpera team, please fix this!fearphage Sunday, August 5, 2007 9:59:56 PM

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?

Rijk Monday, August 6, 2007 12:01:09 AM

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

Kamaleshkamalesh Saturday, September 15, 2007 5:24:24 PM

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.

MyOpera team, please fix this!fearphage Saturday, September 15, 2007 6:11:43 PM

@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.

Samarsamystic Saturday, September 15, 2007 7:55:06 PM

Excellent! Very helpful!!!

Moonbarker Osbourne Tuesday, October 2, 2007 10:27:47 PM

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.

Rijk Wednesday, October 3, 2007 3:53:03 PM

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

Eric Bladeeblade Tuesday, November 6, 2007 7:35:42 PM

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

Eric Bladeeblade Wednesday, November 7, 2007 3:58:54 PM

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

Vague Rantinvagrante Thursday, November 8, 2007 8:34:49 AM

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.

Vague Rantinvagrante Wednesday, November 14, 2007 11:32:52 AM

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

alanhoyle Tuesday, November 27, 2007 9:57:25 PM

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"

Rijk Wednesday, November 28, 2007 10:29:10 PM

@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.

Timothy ConnerVJgamer Thursday, January 10, 2008 5:27:19 AM

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.

Rijk Thursday, January 10, 2008 11:02:25 PM

Oh dear... thanks VJGamer

Timothy ConnerVJgamer Tuesday, January 15, 2008 5:33:17 AM

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

Rijk Tuesday, January 15, 2008 11:17:59 AM

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.

Rory Brenandogred Tuesday, January 22, 2008 5:04:56 AM

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...

Jimjjulagay Thursday, March 6, 2008 7:12:10 PM

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.

Knut Remi "DrLaunch" Løvlidrlaunch Thursday, March 6, 2008 8:07:34 PM

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"

Rijk Thursday, March 6, 2008 8:20:48 PM

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

Write a comment

New comments have been disabled for this post.