Mailto Link with Subject, Body, CC, and BCC (Copy-Paste Examples)
A mailto link opens the user’s email client with the message half-written. Add a subject, body, CC, and BCC by appending query parameters. The format is mailto:to@example.com?subject=...&body=...&cc=...&bcc=.... Here’s every piece, with working examples you can paste into a website or email signature today.
The basic syntax
<a href="mailto:hello@example.com">Email us</a>That’s the bare minimum. Click it, your default email app opens with “To” prefilled.
Adding a subject line
<a href="mailto:hello@example.com?subject=Pricing%20question">Email us</a>Spaces become %20. The first parameter starts with ?, every parameter after that uses &.
Adding a body
<a href="mailto:hello@example.com?subject=Pricing&body=Hi%20team%2C%0A%0AI%20have%20a%20question%20about...">Email us</a>Line breaks become %0A. Two of them in a row (%0A%0A) make a blank line.
Adding CC and BCC
<a href="mailto:hello@example.com?cc=manager@example.com&bcc=archive@example.com&subject=Update">Email both</a>Multiple CC or BCC recipients are separated by commas:
cc=alice@x.com,bob@x.comMultiple recipients in “To”
mailto:alice@x.com,bob@x.com?subject=SyncSame comma rule. Most email clients accept this, but a few older ones only take the first address.
URL encoding cheat sheet
| Character | Encoded |
|---|---|
| Space | %20 |
| Line break | %0A |
| Comma (in body) | %2C |
| Ampersand (&) | %26 |
| Question mark (?) | %3F |
| Hash (#) | %23 |
Skipping encoding is the #1 reason mailto links break. If you don’t want to do it manually, the mailto link generator handles encoding automatically.
Real examples you can steal
Customer support
mailto:support@yourcompany.com?subject=Help%20with%20order%20%23&body=Order%20number%3A%20%0AIssue%3A%20Beta signup
mailto:beta@yourcompany.com?subject=Beta%20access&body=Hi%2C%20I'd%20like%20early%20access%20to%20the%20beta.Bug report from a website
mailto:bugs@yourcompany.com?subject=Bug%20on%20%2Fpricing&body=Browser%3A%20%0ASteps%20to%20reproduce%3A%20Gmail, Outlook, and Apple Mail behavior
| Client | Behavior |
|---|---|
| Gmail (web) | Opens compose with all fields if Gmail is the default mailto handler. |
| Outlook (desktop) | Opens new message with subject and body. CC/BCC sometimes need a manual click. |
| Apple Mail | Full support, all fields populated. |
| iOS Mail | Full support. |
| Android Gmail | Full support. |
Should you use a mailto link or a contact form?
Mailto wins for: simple “contact us” buttons, support pages, signatures, footer links. It uses the visitor’s own email client, so there’s no spam filter weirdness on your end.
A contact form wins for: structured data, file uploads, anti-spam controls, and CRM integrations. If you’re routing leads through HubSpot or similar, skip mailto.
Common mistakes
- Forgetting to URL-encode. A stray
&in the body breaks everything after it. - Putting the body before the subject without a question mark. First parameter is always
?, the rest are&. - Going over the URL length limit. Some clients truncate at ~2000 characters. Keep prefilled bodies short.
- Hardcoding email addresses in HTML. Bots scrape them. Use a generator or obfuscate with JS if spam is a worry.
FAQ
Can I attach a file to a mailto link?
No. Attachments aren’t supported in the mailto spec, no matter what old StackOverflow answers claim. The user has to attach manually.
Why doesn’t my mailto link work in Gmail?
Gmail has to be set as the default mailto handler in your browser. Chrome lets you do this in the URL bar — look for the small handler icon when a mailto link is clicked.
Does mailto work on mobile?
Yes, on every modern phone. iOS opens Mail by default; Android opens Gmail or whichever email app is set as default.
Can I prefill HTML formatting?
No. The body is plain text only. No bold, no images, no links inside the body.
Generate the link in one click
The mailto link generator takes care of subject, body, CC, BCC, and URL encoding in one form. Paste your fields, copy the resulting link, drop it into a button, signature, or QR code.