code_n_code
code_n_code

Reputation: 11

How to use the response submitter email address to send an email

I've a Google form to capture some request details which are stored in associated Google spreadsheet. I've a custom trigger (on_form_submit) which sends email to a number of people whenever a new request is raised. Everything works fine except an issue with email.

My email code is

MailApp.sendEmail(_stMainReceiptEmail, _stsubject, message, { 
    cc: _stRequestEmailCC});

I shared this form with other users. When they complete the form the request email is always send from my Google mail box.

How can I change this so that the email is send using sender's Google mail.

Thanks.

Upvotes: 1

Views: 159

Answers (1)

Zig Mandel
Zig Mandel

Reputation: 19835

Not possible to send using a different email unless you implement your own oauth flows to save their tokens (asking once each user for approval) and make manual calls to the gmail api. Complex but possible.

Upvotes: 1

Related Questions