Mailto Links

How to Create a Mailto Link With Subject, CC and Body

Updated November 25, 2026 · 16 min read

Featured image for How to Create a Mailto Link With Subject, CC and Body

Quick answer: How to Create a Mailto Link With Subject, CC and Body

A mailto link with subject and body looks like this: mailto:support@example.com?subject=Order%20question&body=Hi%20team%2C. The address goes straight after mailto:, a question mark starts the options, and each extra field is added with an ampersand. Use subject, body, cc and bcc as the field names. Encode every space as %20, every line break as %0D%0A, and any ampersand, question mark or hash sign inside your text as %26, %3F and %23. Keep the whole link short, write the body as plain text, and always show the address on the page as well, because some visitors have no mail app set up to open the link.

Key takeaways from How to Create a Mailto Link With Subject, CC and Body

  • The basic pattern is mailto:address?subject=...&body=..., with cc and bcc added the same way.
  • Spaces, line breaks and symbols must be percent-encoded, or the subject and body get cut off or garbled.
  • Use %20 for spaces rather than a plus sign, because several mail clients show the plus sign literally.
  • A mailto body is plain text only. You cannot add formatting, images or attachments through the link.
  • Long links are fragile. Keep pre-filled text brief and test the link in the mail apps your audience actually uses.
  • Show the email address in plain view next to the link so visitors without a configured mail app can still reach you.

Adding a subject line

The subject is the field people reach for first, and it is also where most broken links start. The rule is simple: anything other than letters, numbers and a handful of safe punctuation marks needs to be percent-encoded. In practice that means spaces, commas, colons, ampersands, question marks, hash signs, quotes and any accented or non-Latin characters.

A subject like Quote request: 3 pages becomes Quote%20request%3A%203%20pages in the link. It looks awkward to read, but the mail client decodes it back into normal text before the visitor sees it. If you leave the spaces as they are, many browsers will still fix them silently, but some content systems, email signatures and document editors will break the link at the first space, so the subject ends after the word Quote.

Keep the subject short and descriptive. It is meant to help with sorting and routing, not to carry the whole message. The same guidelines that apply to campaign subjects apply here, and our article on how long an email subject line should be explains why shorter subjects stay readable on phones and in narrow inbox views.

Good uses for a pre-filled subject

  • Routing to the right person in a shared inbox, for example Support, Sales or Press.
  • Labelling where the message came from, such as Pricing page enquiry or Footer contact.
  • Matching a filter rule in your mail system so messages land in the correct folder automatically.
  • Adding a reference that helps the reply, such as a product name or a document title.

Pre-filling the body

The body field drops text into the message area of the new email. It is useful for short prompts that make a reply easier to write, and it is the field where encoding matters most, because a body often contains commas, line breaks and punctuation.

A mailto body is always plain text. You cannot add bold text, links that display as anchor text, images, tables or signatures through the link. Anything that looks like HTML will appear as raw tags in the message. If you need formatting, the mailto scheme is the wrong tool, and a web form or a help desk widget is a better fit.

Line breaks

To start a new line in the body, use %0D%0A, which is the encoded form of a carriage return followed by a line feed. Some clients accept %0A on its own, but the full pair is what the standard expects and it works in the widest range of apps. Two of them in a row create a blank line between paragraphs.

For example, body=Name%3A%0D%0AOrder%20number%3A%0D%0AQuestion%3A produces a short form inside the email:

  • Name:
  • Order number:
  • Question:

That kind of template is where pre-filled bodies earn their place. It tells the sender exactly what you need, and it keeps every message in the same shape, which makes them faster to read and easier to search later.

Do not put personal or sensitive details in a mailto link that you publish. The link is visible in the page source, can be saved in browser history and may be copied into other documents. Pre-fill prompts and labels, not customer data.

Encoding characters correctly

Percent-encoding replaces a character with a percent sign and its two-digit hexadecimal code. It exists because some characters have a job inside a URL. A question mark starts the query string, an ampersand separates fields and a hash sign starts a fragment. If one of those appears inside your subject or body without encoding, the client reads it as structure, not as text.

Characters that most often break mailto links
CharacterEncoded formWhat goes wrong if you skip it
Space%20The link may end at the first space in some editors
Line break%0D%0ALine breaks are lost or the link breaks apart
&%26The text after it is read as a new field
?%3FCan be confused with the start of the query string
#%23Everything after it is treated as a fragment and dropped
%%25Treated as the start of another encoded character
+%2BSome clients turn a literal plus sign into a space
,%2CUsually fine, but encoding avoids edge cases in recipient lists

You can encode text by hand once you know the common codes, but it is easy to miss one character in a long body. A URL encoder converts a whole phrase in one step, and it also works in reverse when you need to read an existing link and check what it actually contains.

Why %20 and not a plus sign

In web forms and many query strings, a plus sign stands for a space. Mailto links follow different rules. The mailto standard treats a plus sign as a literal plus, and while some apps convert it to a space anyway, others show it exactly as typed. A subject written as Order+question can therefore arrive as Order+question in one mail app and Order question in another. Using %20 removes the doubt.

The reverse matters too. Plus signs appear in real email addresses, especially where people use plus addressing to tag sign-ups, such as name+news@example.com. Encoding a plus sign inside a body or subject as %2B keeps it intact in every client.

Adding cc, bcc and several recipients

A link can address more than one person. Put several addresses after mailto: and separate them with commas, as in mailto:sales@example.com,support@example.com. Older advice sometimes suggests semicolons, because some desktop clients accept them, but the standard separator is the comma and it is the most reliable choice.

The cc and bcc fields take the same comma-separated format. A link such as mailto:support@example.com?cc=manager@example.com&bcc=archive@example.com opens a message with all three addresses in the right places. Visitors can see and edit every field before they send, including the bcc line, so bcc is not a way to hide anything from the person writing the email. It only hides the bcc recipients from the other recipients.

Check the addresses before you publish

A typo in a mailto link is easy to miss, because the link still opens a message. The visitor fills it in, presses send and gets a bounce, or worse, the message goes to a stranger with a similar address. Run every address through an email syntax checker before it goes on a page, and send a short test to each inbox the link uses.

  • Confirm there are no spaces before or after an address, especially when it was copied from a spreadsheet or a document.
  • Look for lookalike mistakes, such as a missing letter in the domain or a comma where a dot should be.
  • Make sure every inbox in the link is monitored. A cc address that nobody reads creates a false sense that a message was seen.
  • Avoid long recipient lists. A link that copies five people on every enquiry is usually better handled by a forwarding rule on the server.

Limits and compatibility

Mailto links are old, widely supported and simple, but they depend entirely on the visitor's device. The link does not send anything. It asks the operating system to open whatever app is registered to handle email, and that is where most real-world problems come from.

No mail app set up

Many people read email in a browser tab and never configure a desktop mail app. When they click a mailto link, one of three things happens: nothing at all, a setup wizard for a mail program they do not use, or a prompt asking which app should handle the link. Some webmail services can be registered as the default handler, but you cannot count on visitors having done it.

The practical answer is to show the email address in plain text next to the link, so anyone can copy it into the mail service they prefer. A short note such as Opens your email app also sets expectations and helps people using screen readers understand what will happen when they activate the link.

Link length

There is no single official maximum length for a mailto link, but very long links fail in practice. Some desktop clients and older browsers truncate links somewhere around two thousand characters, and long encoded bodies grow quickly because every space and line break takes three or six characters. A good rule is to keep the full link well under that, which in practice means a one-line subject and a body of a few short lines.

Other things the scheme cannot do

  • It cannot attach files. Any attachment parameter you find in old forum posts is ignored by modern clients.
  • It cannot choose the sending account. The visitor's default account is used.
  • It cannot set a reply-to address, priority or read receipt in a reliable, cross-client way.
  • It cannot confirm that a message was sent. You only know a link was clicked, and only if you measure clicks separately.
When to use a mailto link and when to use something else
SituationMailto linkContact form or help desk
Quick contact from a footer or signatureGood fitOften more than needed
Structured requests with required fieldsWorks for prompts, cannot enforce answersBetter fit
File uploads or screenshotsNot possible through the linkBetter fit
Visitors who prefer their own inboxGood fitSome people find forms impersonal
Tracking which page produced a messagePossible with a labelled subjectBuilt in

Testing before you publish

A mailto link takes a few seconds to test, and testing is the only way to know how it behaves for real people. Clients differ in small ways, especially in how they treat line breaks, plus signs and very long bodies, so a link that looks perfect in one app can arrive slightly wrong in another.

  1. Click the link in at least one desktop browser and confirm which mail app opens.
  2. Check that the To, cc and bcc lines contain exactly the addresses you expect, with no stray spaces.
  3. Read the subject and body as the visitor will see them, and look for leftover codes such as %20 or a literal plus sign.
  4. Repeat the test on a phone, because mobile mail apps often handle long bodies and line breaks differently.
  5. Send the test message and confirm it reaches every inbox listed in the link.
  6. Keep a copy of the working link in your documentation so the next person who edits the page does not rebuild it from memory.

When you change a page template, check the email links again. Template edits, copy-and-paste between editors and automatic link formatting are common ways for a working mailto link to lose its encoding.

Common mistakes

  • Typing spaces directly into the subject or body instead of encoding them as %20.
  • Using a second question mark instead of an ampersand to add the next field.
  • Leaving an unencoded ampersand or hash sign in the body, which cuts the text short.
  • Writing a long, formatted email template into the body and expecting it to keep its layout.
  • Using a plus sign for spaces and assuming every client will convert it.
  • Separating several recipients with semicolons and assuming every client accepts them.
  • Publishing a link to an inbox that nobody monitors, or to a personal address that will attract spam.
  • Hiding the address entirely behind link text, so people without a mail app have no way to copy it.

Almost all of these come from writing links by hand and not testing them. Building the link with an encoder, reading the output once and clicking it on two devices catches nearly every one.

Try Mailto Link Generator after reading

Generate a mailto: link with recipients, subject, body, cc and bcc pre-filled and correctly encoded. Copy the URL or HTML anchor. Free and private.

Open Mailto Link Generator - it's free

Questions about How to Create a Mailto Link With Subject, CC and Body

How do I add a subject to a mailto link?
Add a question mark after the email address, then subject= followed by your encoded text, for example mailto:support@example.com?subject=Website%20enquiry. Encode spaces as %20 and any symbols with their percent codes.
How do I add a line break in a mailto body?
Use %0D%0A for each new line. Two in a row create a blank line between paragraphs. Some clients accept %0A on its own, but the full pair works in the widest range of mail apps.
Can I add both a subject and a body?
Yes. Start the first field with a question mark and join every other field with an ampersand: mailto:name@example.com?subject=Hello&body=Hi%20there. The order of the fields does not matter.
How do I send to several people with one mailto link?
Separate the addresses with commas after mailto:, and use the cc and bcc fields for copy recipients. Commas are the standard separator and are more reliable than semicolons.
Can a mailto link include an attachment or formatted text?
No. The body is plain text only, and modern mail clients ignore attachment parameters. If you need files or formatting, use a contact form or ask people to attach the file after the message opens.
Why does my mailto link do nothing when I click it?
The device probably has no default mail app configured, or the default is set to a program the person does not use. Show the address in plain text next to the link so visitors can copy it into their own email service.
Is there a length limit for mailto links?
There is no single official limit, but some clients and browsers truncate long links at around two thousand characters. Keep the subject to one line and the body to a few short lines to stay well within safe limits.
Should I use %20 or a plus sign for spaces?
Use %20. The mailto standard treats a plus sign as a literal character, and some mail apps display it as a plus instead of converting it to a space.

More reading about Mailto Links

Tools mentioned in How to Create a Mailto Link With Subject, CC and Body