Mailto hyperlink example
Here is an example of a mailto hyperlink:
mailto:[email protected]?subject=Hello&body=This%20is%20a%20test%20email
Let's break it down:
mailto:
is the protocol used to open the email client.[email protected]
is the email address of the recipient.?subject=Hello
specifies the subject of the email.&body=This%20is%20a%20test%20email
specifies the body of the email. The%20
is used to encode the spaces in the text.
When you click on this hyperlink, it will open the default email client on your device and compose a new email with the specified subject and body.
You can customize the hyperlink to include additional parameters, such as:
cc
to specify a carbon copy recipient:[email protected]
bcc
to specify a blind carbon copy recipient:[email protected]
to
to specify additional recipients:[email protected],[email protected]
attachment
to attach a file:attachment=file.txt
Here's an example with multiple parameters:
mailto:[email protected]?subject=Hello&body=This%20is%20a%20test%20email&[email protected]&[email protected]&attachment=file.txt
Keep in mind that not all email clients support all of these parameters, and some may have limitations on the length of the subject and body.