Email link with attributes not working

Is it possible to add a mailto link with attributes? I’ve entered something like this

mailto:name@email.net?subject=Subjecthere&body=Hello!

but Scrivener says “The link does not point to a valid URL”. It’s the same if I select “Email” or “No Prefix”.

Have you got the “mailto” part twice?

Works for me, if I don’t add mailto in the link itself.

[attachment=0]mailto.png[/attachment]

Nope. If I choose “Email” and mailto is automatically added, I don’t add it myself.

But ha, now it’s working! Re-launched Scrivener in the meantime. Previously I kept on getting this error. I wonder if I managed to create some exception while tweaking with different options. Thanks Briar Kit for making me try again!

I figured what the problem is. An umlaut character “ä” in the Body part causes the error. Using ä instead doesn’t help. Could there be some way?

Hmm, seems like Scrivener doesn’t accept a body longer than one word. As soon as I add another word, the error appears, no umlauts need, for example

name@email.net?subject=Subjecthere&body=Error case

Using quotes around Error case doesn’t help.

Have you tried enclosing the body text in quotation marks?

Quotation marks don’t help, error persists. It’s same with the subject by the way, only one word allowed.

I get an error with all these:

name@email.net?subject=Subjecthere&body=Error case
name@email.net?subject=Subjecthere&body=“Error case”
name@email.net?subject=Subject here&body=Error
name@email.net?subject=“Subject here”&body=Error
name@email.net?subject=Subjecthere&body=Errör
name@email.net?subject=Subjecthäre&body=Error

With underscores I can escape the more-than-one-word problem, but of course the email will have underscores then.

Been out. Couldn’t reply earlier.

You need
%20
for a space.

So
name@email.net?subject=Subject%20here&body=Error%20case
will (should) work. It does work for me…

UTF-8 umlaut characters here…
wallaby.de/forum/mailto-urlencod … Y8MFEvxWfS

Zeichen UTF-8 ISO-LATIN1 Ä %C3%84 %C4 Ö %C3%96 %D6 Ü %C3%9C %DC ä %C3%A4 %E4 ö %C3%B6 %F6 ü %C3%BC %FC ß %C3%9F %DF

And more here…
utf8-chartable.de

Perfect! Thank you very much Briar Kit. I wonder why this special code is needed in Scrivener while normally in HTML it is not.

Welcome. Hope it works as you need it to.

Maybe one of the devs will be able to answer that question. Different encoding, I guess.

Bestest

Briar Kit

Many clients do those translations from what you see to the special escaped characters in the background – so the space does get translated to %20, etc.

Technically speaking, spaces in URLs are invalid URLs, and the software just assumes you are pasting in a valid URL. There are many utilities for percent-escaping URLs though, from web pages to Mac services to stuff built pasteboard managers and text expansion utilities.