VOL. I · NO. 1
PACKAGE v0.3.0
✦ TECHNOLOGY SPECIAL

The Internet Times

All the protocols that are fit to fix.

HTML guide · RFC 6068

Mailto link HTML: syntax, examples, and limits

Put mailto: inside an anchor's href. Add encoded subject, body, CC, or BCC fields only when they help the visitor start the message.

Build a mailto link

Start here

Use a normal HTML anchor

Put the recipient after mailto:. Use useful link text, such as “Email support,” so the destination is clear before the visitor clicks.

Basic HTML
<a href="mailto:hello@example.com">Email support</a>

This format follows the mailto URI defined by RFC 6068. The browser chooses what opens next. Your page cannot force Gmail, Outlook, or a desktop app with a plain mailto link.

Field reference

Start optional fields with a question mark

The first optional field starts with ?. Later fields start with &. In HTML source, write that separator as &amp;.

FieldSyntaxExample
RecipientAfter mailto:mailto:hello@example.com
Subjectsubject=?subject=Project%20question
Bodybody=&body=Can%20we%20talk%3F
CCcc=&cc=team@example.com
BCCbcc=&bcc=archive@example.com
HTML with every common field
<a href="mailto:hello@example.com?cc=team@example.com&amp;bcc=archive@example.com&amp;subject=Project%20question&amp;body=Hi%20team%2C%0D%0A%0D%0ACan%20we%20talk%3F">Email the team</a>

Reserved characters

Encode values, not the whole link

Percent-encode subject and body values. Use %20 for a space, %26 for an ampersand, %3F for a question mark, and %0D%0A for a line break.

Keep structural

mailto:, ?, field names, and separators.

Encode as data

Subject text, body text, punctuation, and line breaks.

Do not run encodeURIComponent() over the full URL. Build the structure first and encode each text value separately.

Client handoff

Know what the link cannot guarantee

A mailto link opens a draft. It cannot send automatically, confirm delivery, hide addresses from the page source, or choose the visitor's email app.

Use mailto for a simple, visitor-led message. Use a contact form when routing, required fields, private recipients, or a reliable submission record matter.

Keep private data out.

Recipients, BCC addresses, subjects, and body text remain visible in the URL and page source.

Diagnostic desk

Fix the handoff, not only the HTML

Start with the symptom. A valid link and a broken device handler need different fixes.

Nothing opens

The link is malformed, or the device has no working mail handler.

Run the general checks

The wrong app opens

The browser or operating system controls the default handler.

Change the handler

Subject or body breaks

A reserved character was not percent-encoded.

Fix the encoding

Several addresses fail

The list uses semicolons, spaces, or a client-specific format.

Use the standard list

Common questions

Mailto link FAQ

What is a mailto link?

A mailto link is an HTML anchor whose href starts with mailto:. Clicking it asks the browser or operating system to open an email composer with the supplied fields.

Does a mailto link send an email automatically?

No. It opens a draft in the visitor’s configured email handler. The visitor can edit, send, or close that draft.

Do mailto links still work?

Yes, when the device has a working email handler. A valid link can still open the wrong app or do nothing when that handler is missing or misconfigured.

Are mailto links safe?

The link itself does not send data, but every address and prefilled field is visible in the page source. Do not put private or sensitive information in a mailto URL.