Search code examples
htmlmailto

Is there a way to fill the subject line using select and using html only (without javascript, php, or any other source) just html?


Is there a way to fill the subject line using select and using html only (without javascript, php, or any other source) just html?

example below

<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>&nbsp;
<a href="MAILTO:mymail@home.com?Subject="><b>Sign Up</b></a>

Solution

  • Try to use form tag with mailto schema:

    <form method="get" action="mailto:myemail@exampe.com" enctype="application/x-www-form-urlencoded">
    <select name="subject">
        <option value="Hello">Hello</option>
        <option value="Goodbye">Goodbye</option>
    </select>
    <input type="submit" value="Go">
    </form>