Sobes.tech
Intern

How to create a link to an email address?

sobes.tech AI

Answer from AI

The URI scheme mailto: is used in the href attribute of the <a> tag.

<a href="mailto:example@email.com">Send an email</a>

To specify the subject and body of the email, additional parameters can be used, separated by a ? after the address, with key-value pairs separated by &.

<a href="mailto:example@email.com?subject=Question%20about%20the%20project&body=Hello,%20I%20have%20a%20question.">Send an email with subject and body</a>

Special characters in the subject and body parameters should be URL-encoded, for example, spaces are replaced with %20.

How to create a link to an email address? — Java - sobes.tech