Skip to content

Instantly share code, notes, and snippets.

@JEverhart383
Created April 1, 2016 13:31
Show Gist options
  • Select an option

  • Save JEverhart383/16945b0aedb8466c516cc3d9b295fad7 to your computer and use it in GitHub Desktop.

Select an option

Save JEverhart383/16945b0aedb8466c516cc3d9b295fad7 to your computer and use it in GitHub Desktop.
This is a basic example of how to grab a user email from a form submission and send them an email
function myFunction(e){
//pass inital event parameter to access form responses
//use e.values to get whatever form values you want
var userEmail = e.values[1];
//use MailApp.sendEmail to send email
var subject = "Email Sent from Google Form";
var body = "Email sent from google forms body";
MailApp.sendEmail(userEmail, subject, body);
//Learn more at this URL: https://developers.google.com/apps-script/reference/mail/mail-app#sendemailrecipient-subject-body
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment