mailto links: every parameter (subject, CC, BCC and body) with examples
A mailto link can do quite a bit more than open a blank email. This is the full reference of what it supports and what it doesn't.
Structure
A mailto: link has the recipient's address and, optionally, a list of fields after a question mark, separated by &:
mailto:[email protected]?subject=Consulta&body=Hola| Field | What it does | Example |
|---|---|---|
| (address) | Main recipient. Several, separated by commas. | mailto:[email protected],[email protected] |
subject | Email subject. | ?subject=Pedido%20de%20presupuesto |
cc | Copy. | &[email protected] |
bcc | Blind copy. | &[email protected] |
body | Message text. | &body=Hola%2C%20quiero... |
Full example
mailto:[email protected][email protected]&subject=Pedido%20de%20presupuesto&body=Hola%2C%0D%0A%0D%0AQuiero%20un%20presupuesto%20para%3A%0D%0A%0D%0AGracias.
That link opens an email to sales, with a copy to support, the subject “Pedido de presupuesto” (quote request) and a four-line body.
Encoding: what fails most
- Spaces: written as
%20. The+sign isn't read as a space in mailto and may show up literally in the subject. - Line breaks:
%0D%0A. Two in a row leave a blank line. &and?inside the text: they must be written as%26and%3F, because unencoded they cut the field short.- Accented letters: in UTF-8, for example
%C3%B3for ó. The generator takes care of it.
What mailto can't do
- Attach files. There is no standard field for attachments.
- Send the email. It only opens the draft; the person has to send it.
- Format the text. The body is plain text, with no bold or HTML links.
- Choose the program. It opens the device's default email application. If the person uses webmail and hasn't set anything up, nothing may open.
Good practices
- Show the address as text too next to the link, for people who don't have an email application set up.
- Keep the link short. Some programs cut very long URLs. A body of a few lines is safe; a whole letter isn't.
- Watch out for spam. An address published in a mailto link can be harvested by bots. For heavily exposed addresses, a contact form may be better.
Try it now
Generate your link for free, with no sign-up and without your data leaving the browser.
Email link generator (mailto)