Anatomy of a mailto URL
A mailto URI begins with mailto:, then the recipient list, then optional header fields after a question mark, separated by ampersands. The recipient goes in the path; cc, bcc, subject and body are name=value pairs. Values must be percent-encoded because characters like &, ? and spaces would otherwise break the structure.
Example: To support@example.com, subject Order 1042: late, body of two lines. The URL is mailto:support@example.com?subject=Order%201042%3A%20late&body=Hello%2C%0D%0AMy%20order%20is%20late. The %0D%0A in the body is the line break.
- Recipients: the @ stays literal, other reserved characters are percent-encoded.
- In HTML: use the anchor output so & is written as &.
- Plain URL: use the URL output in JavaScript, markdown or email signatures.