Google Apps Script – Sending Emails onSubmit Using Web Forms

google-apps-scriptgoogle-formshtml

Is it possible to send emails onSubmit() with Google Apps Script Custom Web Forms just like we can do using mailApp with Google Forms?

I am currently transferring google forms code into html forms but I can't seem to find how I would be able to send email notifications like I have done for Google Forms.

Any pointers/links will be really helpful.

Best Answer

You need to use the google.script.run.myServerFunctionName() client side API. You will need to use that anyway, in order to send the form data, unless you are using a HTTPS GET or POST request to send the data somewhere.

Apps Script documentation - google.script.run