HTML Button to Send Email

html button to send email

You can use mailto, here is the HTML code:

<a href="mailto:EMAILADDRESS">

Replace EMAILADDRESS with your email.

How do I code my submit button go to an email address

You might use Form tag with action attribute to submit the mailto.

Here is an example:

<form method="post" action="mailto:youremail@youremail.com" >
<input type="submit" value="Send Email" />
</form>

How to link a button to an email address

Just write

<a class="button" href="mailto:email@email.de">Kontakt</a>

Contact Form Submit Button link to Email

Sadly (vanilla) HTML+CSS doesn't provide possibility to send emails. Such an action can be achieved with PHP. HTML is just a markup language (it tells your browser where various elements are located), whereas CSS is styling language (it tells the browser how do the HTML-defined elements look like).

Your code opens your default e-mail client, because that's what mailto action does.

Maybe this answer using PHP can be helpful for you in creating your form: https://stackoverflow.com/a/18382062/12631978



Related Topics



Leave a reply



Submit