-1

I want a basic form on my website, with e-mail notification.

Now I have the following code, but this doesn't send an email notification automatically.

Does anyone know how to add an automatic email notification?

<!DOCTYPE html>
<html>
<body>
<font face="verdana">
<h2>Title</h2>

<form action="MAILTO:(emailadress)" method="post" enctype="text/plain">
Name:<br>
<input type="text" name="name" value=""><br>
E-mail:<br>
<input type="text" name="mail" value=""><br>
Country:<br>
<input type="text" name="country" value=""><br>
<br>
<br><br>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</font> 
</body>
</html>
jordinec
  • 75
  • 5
  • 1
    Why would that automatically email something, its just html – user1231232141214124 Apr 08 '16 at 18:20
  • 1
    Apparently according to [this](https://support.microsoft.com/en-us/kb/279460) for example, it's supposed to work. However that's some outdated technology if you ask me. – Kayaman Apr 08 '16 at 18:24
  • Hi jordinec, do you feel as though your question has been answered completely? If your question hasn't been fully answered, please elaborate on what else you need to know so the community can provide you with further help! Thanks! – Maximillian Laumeister Apr 14 '16 at 04:01

1 Answers1

0

Using a mailto link as a form action (if done correctly) only populates the user's default mail sending program, it does not send an email automatically. See this answer for details. If you want your form to send an email directly and automatically, you will need to have it connect to a 3rd party email service's API to send it.

One example of a free service that turns an API call into a sent email is FormSpree, but you can also use a generic email sending API like Mailgun, Sendgrid, or similar.

Community
  • 1
  • 1
Maximillian Laumeister
  • 19,884
  • 8
  • 59
  • 78
  • Another alternative is www.enformed.io, has a couple of interesting features, like setting the redirect after submiting, and email customization. – Ivangrx Oct 07 '16 at 15:14
  • @Ivangrx Cool service. Looks like it launched earlier this year, and has some extra features compared to formspree. – Maximillian Laumeister Oct 07 '16 at 16:47