Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send email with form submission on Netlify?

Tags:

html

netlify

I am making a website for a restaurant and I want to make a reservation form where people would enter their name, time of reservation, etc. And when they submit this form I want to send an email to my email.

I know there is a service called Zapier which gives you the ability to do that, but I am looking for something free (in this case Zapier free tier has only 100 tasks per month which may not be enough).

I would want it to look something like this:

<form>
    <input type="text" placeholder="Your name" />
    <!-- and some other inputs -->
    <input type="submit" value="Send" />
    <!-- after this send an email with entered information -->
</form>
like image 644
mememanyes Avatar asked Apr 21 '19 17:04

mememanyes


2 Answers

Instead of using Netlify or Zapier, you might just want to use getsimpleform.com as the form endpoint. As far as I know, the service is free and sends you an email on form submission.

like image 105
spekulatius Avatar answered Oct 10 '22 02:10

spekulatius


If you're hosting your site on Netlify you can use their feature "Netlify forms" which is free and easy to integrate (just add a custom "netlify" attribute to your HTML form element). Here are their docs:https://docs.netlify.com/forms/setup/#html-forms

Netlify also helps you with spam/robot protection before (e.g. via a so called "honeypot" field) and after submit (e.g. via a tool called "akismet").

Then you can set up email notifications, which will send you the data of the submitted form to your email inbox of choice. Here are their docs: https://docs.netlify.com/forms/notifications/

like image 6
Alexa Avatar answered Oct 10 '22 03:10

Alexa