26

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

Joshua Fox
  • 18,704
  • 23
  • 87
  • 147

3 Answers3

44

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

Community
  • 1
  • 1
Knut
  • 1,792
  • 13
  • 9
  • Thank you. That is indeed what I have and it does not work. Note that Firefox opens Thunderbird correctly for the same link. – Joshua Fox May 25 '14 at 11:58
  • In that case I'd suggest to file a bug for the linux version of Chrome 34… If Firefox **and** Chrome 36 on OSX does understand the link (and as its fine to the RFC) it is an application issue… – Knut May 25 '14 at 13:38
  • The same problem occurs on Chrome on Windows. – Joshua Fox May 27 '14 at 09:13
  • This works fine on Windows. Chrome version 35.0.1916.114 m on Windows 7 Professional SP1 – keiv.fly May 30 '14 at 18:52
  • So then it looks like the issue has already been filed and is fixed with Chrome 35… Maybe also on Linux… – Knut May 31 '14 at 07:36
5

Try adding a space between mailto: and ?body=AAA,&subject=BBB like this:

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

Or even adding the space as Unicode like this:

<a href="mailto:%20?body=AAA,&subject=BBB">mail link</a>
Giacomo1968
  • 25,759
  • 11
  • 71
  • 103
0

What about <a href="mailto:?to=%20&body=AAA,&subject=BBB">mail link</a>

Wezelkrozum
  • 831
  • 5
  • 15