0

(https://github.com/sdcollegewws/website.git "my repository in github") (https://sdcollegewws.github.io/website/ "static website")

I created a static website. I need to email the submission of the form in website to my teacher automatically.

I know to send email to my gmail using google app scripts.But the method i use need to login with the gmail account to be sent

How to do it?

Filburt
  • 17,626
  • 12
  • 64
  • 115
  • You can embed a Google Form into the site in an iframe, and when the Google Form is submitted, run an On Form Submit trigger that runs code and sends the email. Actually, it's easier to run the On Form Submit trigger from a Google Sheet. Go into a Google Sheet, create a Form from the Sheet. The Form will put answers into the Sheet. Run an On Form Submit trigger from the Google Sheet that sends an email. See [Event Objects](https://developers.google.com/apps-script/guides/triggers/events#form-submit) in the Google Docs. In the Form in edit mode click "Send" and then "<>" Embed. – Alan Wells May 01 '21 at 14:21
  • If you don't want to write your own code, there are free add-ons to Google Forms that can send an email when someone submits a Google Form. – Alan Wells May 01 '21 at 14:30

1 Answers1

1

I have used formspree a couple of times, It’s super simple.

You just have to add it as an action to a HTML form with an ID they give you:

<form action="https://formspree.io/f/{form_id}" method="post">
   <label for="email">Your Email</label>
   <input name="Email" id="email" type="email">
   <button type="submit">Submit</button>
</form>

You can find the docs here

There’s also formspark. I have not used it, but it looks to have more free emails.

Wylie Fowler
  • 399
  • 2
  • 12