Mail.to html
mailto:
is a protocol used to create a link that, when clicked, opens the user's default email client with a pre-filled email message. The syntax for creating a mailto:
link in HTML is as follows:
<a href="mailto:[email protected]">Send email</a>
Here:
mailto:
is the protocol[email protected]
is the email address to which the link will send the emailSend email
is the text that will be displayed as the link text
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&body=This%20is%20a%20test%20email">Send email</a>
Here:
subject=Hello
sets the subject of the email to "Hello"body=This%20is%20a%20test%20email
sets the body of the email to "This is a test email" (note that the%20
is used to encode the spaces in the text)
You can also use multiple parameters by separating them with an ampersand (&). For example:
<a href="mailto:[email protected]?subject=Hello&body=This%20is%20a%20test%20email&[email protected]">Send email</a>
Here:
[email protected]
adds the email address[email protected]
to the CC list of the email
Note that the mailto:
protocol is not supported by all email clients, and some clients may not support all of the parameters. Additionally, some email clients may not allow the user to edit the email message before sending it.