A contact link can prepare a useful subject and a short message before someone writes an email. With mailto:, encode the subject and body text separately, then add the link structure around those values. For a multiline body, the email URI standard specifies a particular line-break representation.
This example uses the fictional address editor@example.com. It demonstrates link construction, not an existing mailbox or a delivered message.
Choose the message text first
Use this single-line subject:
Guide review + next steps
The intended plain-text body has two lines:
Hello editorial team,
Please review the FAQ + examples.
Keep the recipient, subject and body in separate notes while preparing the link. This makes it easier to compare the finished draft with the original wording. The plus signs in this example are actual characters, not substitutes for spaces.
Encode the subject and each body line
- Open the URL Encoder and Decoder.
- Select Encode under Mode and Component (encodeURIComponent) under Encoding type.
- Leave Treat + as a space (form style) unchecked.
- Paste the subject into Input and select Convert. Save that output, then repeat for each body line separately.
The three results are:
Subject: Guide%20review%20%2B%20next%20steps
Line 1: Hello%20editorial%20team%2C
Line 2: Please%20review%20the%20FAQ%20%2B%20examples.
The labels above identify the results; do not include those labels in the link. Spaces remain %20, and each literal plus becomes %2B. MDN documents component encoding and its distinction from encoding a complete URI.
Join body lines with the mailto line break
Place %0D%0A between the two encoded body lines. RFC 6068 specifies this sequence for message-body line breaks. It represents carriage return followed by line feed. Keep the subject on one line.
Encoding a multiline textarea can produce %0A for its newline. For this workflow, converting each line separately and inserting the specified sequence avoids depending on how the input box represents line endings. Do not encode the already encoded pieces again.
Assemble the complete URI on one line:
mailto:editor@example.com?subject=Guide%20review%20%2B%20next%20steps&body=Hello%20editorial%20team%2C%0D%0APlease%20review%20the%20FAQ%20%2B%20examples.
A narrow preview may wrap this long URI visually. That is not an extra message line. Keep the underlying URI continuous; the encoded %0D%0A inside the body is the intentional break between the greeting and request.
Keep mailto:, the recipient, ?subject= and the separator before body= as structure. The encoder prepares the text pieces; it does not check an email account or test a mail application.
Use the correct representation in HTML
For an HTML source attribute, write the structural ampersand as &:
<a href="mailto:editor@example.com?subject=Guide%20review%20%2B%20next%20steps&body=Hello%20editorial%20team%2C%0D%0APlease%20review%20the%20FAQ%20%2B%20examples.">Email editorial team</a>
If a website editor provides a link URL field, supply the URI from the previous section; let the editor handle HTML serialization. Inspect its preview before publishing. Our HTML code display guide explains the separate escaping needed when showing markup as readable text.
Check the compose window before sharing
MDN describes mailto links as opening an email program for a new message. The device needs an appropriate handler, and application behavior can differ. A link opening a draft does not establish delivery.
For a real implementation, preview the link with the mail applications your audience uses. Check the recipient, the exact subject, both body lines and the preserved plus signs. Close the test draft without sending. Provide a visible contact address or another contact method for visitors whose device does not open the expected compose window.