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

3

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

Isom answered 22/5, 2014 at 17:5 Comment(2)
Chrome 34.0.1847.137 Ubuntu 13.10Isom
@JoshuaFox Is this still an issue in Ubuntu or this works fine now on newer versions? I don't have Ubuntu to test.Officious
W
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

Wehrle answered 25/5, 2014 at 8:6 Comment(5)
Thank you. That is indeed what I have and it does not work. Note that Firefox opens Thunderbird correctly for the same link.Isom
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…Wehrle
The same problem occurs on Chrome on Windows.Isom
This works fine on Windows. Chrome version 35.0.1916.114 m on Windows 7 Professional SP1Cariole
So then it looks like the issue has already been filed and is fixed with Chrome 35… Maybe also on Linux…Wehrle
M
6

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>
Malkin answered 24/5, 2014 at 17:42 Comment(2)
I tried both. Both produced the same error as without the space.Isom
The version with a %20 space works for me (and also with outlook).Market
I
1

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

Insomnia answered 30/5, 2014 at 23:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.