How to create a mailto link with a subject?

Last modified by Lucas Charpentier (Sereza7) on 2024/03/26

Creating a client-side mail link is easy. For example in XWiki Syntax 2.0:

[[john@doe.net>>mailto:john@doe.net]]

If you wish to also define the subject that would appear in the mail client when clicking on the link, it can be done in this manner:

[[john@doe.net>>mailto:john@doe.net?subject=hello]]

However it should be noted that the generated HTML will not pass WCAG Validation. More precisely some mail clients may not understand the subject parameter.

Get Connected