Example mailto linkou
A mailto
link is a type of hyperlink that allows users to send an email to a specific address directly from their web browser or email client. Here's an example of a mailto
link:
mailto:[email protected]?subject=Hello&body=This%20is%20a%20test%20email
Let's break down the different parts of this link:
mailto:[email protected]
: This is the email address that the link will send the email to.?subject=Hello
: This is an optional parameter that sets the subject line of the email. In this case, the subject line will be "Hello".&body=This%20is%20a%20test%20email
: This is another optional parameter that sets the body of the email. In this case, the body of the email will be "This is a test email". The%20
characters are URL-encoded spaces, which are necessary because spaces are not allowed in URLs.
When a user clicks on this link, their default email client will open with the email address, subject line, and body already filled in. They can then modify the email as needed and send it.
Here are a few more examples of mailto
links:
mailto:[email protected]?subject=Hello%20World
: This link sets the subject line to "Hello World".mailto:[email protected]?body=This%20is%20a%20test%20email%20with%20multiple%20lines
: This link sets the body of the email to a multi-line message.mailto:[email protected][email protected]&[email protected]
: This link sets the CC (carbon copy) and BCC (blind carbon copy) recipients for the email.
Keep in mind that mailto
links may not work as expected in all email clients or browsers, and some users may not have a default email client set up.