Last modified: 2023-03-29
Mailto links
Mailto link has following format:
mailto:<email_address>,<email_address2>?<parameter>&<parameter2>
Recipients are separated by comma (,
). You can have more than 2 recipients ;).
Additional parameters are possible, such as:
- cc (carbon copy)
- bcc (blind carbon copy)
- subject
- body
These additional arguments must be separated from the to
field with question mark (?
).
You are rather limited in the characters you can put into a HTML link.
At least according to stackoverflow.com and this Uniform Resource Identifier (URI): Generic Syntax document, following characters are allowed in HTML link:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!&'()*+,;=
If you want other characters, or perhaps you would like to have a reserved character in the subject field, you have to encode the character into %<hex_code>
.
Here is a short table of the most used hex codes (full table at HTML URL Encoding Reference):
Hex code | Character |
---|---|
%20 | |
%21 | ! |
%2D | - |
%2E | . |
%3A | : |
%3F | ? |