What is a mailto link?
A mailto link is a type of HTML hyperlink that opens the user's default email client when clicked. It allows you to pre-fill certain fields such as the recipient email address, CC, BCC, subject, and body of the email.
Start with mailto:
The mailto link starts with mailto: followed by the
recipient's email address.
Single recipient:
To specify a single recipient, use the to parameter
in the mailto link.
Multiple recipients:
To specify multiple recipients, separate their email addresses
with commas in the to, cc, or
bcc parameters.
No recipient:
You can also create a mailto link without specifying a recipient, although it may not be very useful as the email client won't know where to send the email.
Characters that divide parameters:
The parameters in a mailto link are typically divided by
characters such as ? to start the parameters
section, and & to separate individual parameters.
Mailto link with subject:
To include a subject in the email, use the subject
parameter followed by the desired subject text in the mailto
link.
Spaces and other special characters:
Special characters and spaces in mailto link parameters should be
encoded using URL encoding. For example, spaces are encoded as
%20.
Mailto link with subject and body:
To include both a subject and a body in the email, use the
body parameter followed by the desired email body
text in the mailto link.
Mailto link with subject, body, BCC, and CC:
You can include multiple parameters in a mailto link to pre-fill the subject, body, CC, and BCC fields of the email.
HTML tags:
You can use HTML tags within the subject and body parameters of a mailto link to format the email content. However, note that not all email clients support HTML content in mailto links.