Thang
Thang

Reputation: 1

Google Apps Script - Can I send email from another account

I have just implement a simple function to send email automatic when a google form is submitted, with my current account.

When I sign in with other google account and submit this form. I recieve an email with my account (not account is signed). Is there any way to send with the account is signed?

Upvotes: 0

Views: 234

Answers (1)

Serge insas
Serge insas

Reputation: 46812

Edit: I think I misunderstood your question...

2 things to know:

  1. When a script sends an email using a triggered function ( a form submit trigger in this case) the mail will always be sent by the account of the creator of the trigger.

  2. As explained below, to get the email address of the user submitting a form you must be part of a google-apps domain.

If you are using your form in a GAFE or business Google Apps account then you can use the getRespondentEmail() method but as mentioned in the documentation this does not work for normal Gmail accounts.

Upvotes: 1

Related Questions