Mailto on submit button

In HTML you can specify a mailto: address in the <form> element’s [action] attribute.

<form action="mailto:[email protected]" method="GET">
    <input name="subject" type="text" />
    <textarea name="body"></textarea>
    <input type="submit" value="Send" />

What this will do is allow the user’s email client to create an email prepopulated with the fields in the <form>.

What this will not do is send an email.

Leave a Comment