Example mailto link html
Here is an example of a mailto
link in HTML:
<a href="mailto:[email protected]">Send an email to [email protected]</a>
This will create a link that, when clicked, will open the user's default email client with a new email message addressed to [email protected]
.
You can also add additional parameters to the mailto
link to specify the subject, body, and other details of the email. For example:
<a href="mailto:[email protected]?subject=Hello%20World&body=This%20is%20a%20test%20email">Send an email to [email protected]</a>
This will create a link that, when clicked, will open the user's default email client with a new email message addressed to [email protected]
with the subject "Hello World" and the body "This is a test email".
Here are some additional parameters you can use:
subject
: sets the subject of the emailbody
: sets the body of the emailcc
: sets the CC recipientsbcc
: sets the BCC recipientsto
: sets the TO recipients (default is the email address specified in themailto
link)from
: sets the FROM address (default is the email address specified in themailto
link)
For example:
<a href="mailto:[email protected]?subject=Hello%20World&body=This%20is%20a%20test%20email&[email protected]&[email protected]">Send an email to [email protected]</a>
Note that the %20
is used to encode spaces in the subject and body, as email addresses and subjects cannot contain spaces.