Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create mailto links without recipient that will work on Chrome on Ubuntu?

Tags:

I have a mailto link in my HTML. The HREF is

<a href="mailto:?to=&body=AAA,&subject=BBB">MAIL</a> 

In other words, I am specifying body and subject, but not recipient.

In Chrome on Ubuntu, clicking this produces an dialog with a error

Unable to detect the URI-scheme of "mailto:?body..... 

Note that Firefox opens Thunderbird correctly for the same link.

How do I code this link so it works?

Chrome 34.0.1847.137 Ubuntu 13.10

like image 634
Joshua Fox Avatar asked May 22 '14 17:05

Joshua Fox


People also ask

Do mailto links work in Chrome?

If you want Chrome and Gmail to open mailto links for you by default, make sure Google Chrome is picked as the default client on either OS. In Firefox, you can also specify which client should handle mailto links. Click on the menu button -> Preferences.


1 Answers

If I understand the definition right this should work:

<a href="mailto:?to=&body=AAA,&subject=BBB">MAIL</a> 

At least it does work in Chrome 36 on OSX…

RFC 6068: The 'mailto' URI Scheme

like image 97
Knut Avatar answered Sep 21 '22 14:09

Knut