情景如下:
通过Google Apps脚本,是否可以以此方式检索受访者的电子邮件地址?出于具体原因,我不允许查询受访者的电子邮件地址。以这种方式检索电子邮件地址也可作为验证,以便可以验证我发送表单的哪些电子邮件地址有回复。
I我知道如果你有一个包含用户电子邮件地址的字段,这是非常有用的。甚至还有一个教程。但是,我还没有看到上述用例的指南。
我尝试使用 Session.getActiveUser()。getEmail() 。但是,它似乎只是检索我自己的电子邮件地址(因为它认为我是查看电子表格的人员,是活跃用户)。 解析方案
只有在您使用Google Apps for Business,Google Apps for Education或Google Apps for Your Domain时,才能完成此操作,并且您的域中的用户可以填写表单。在这种情况下,您可以使用 getRespondentEmail() 检索提交者的电子邮件地址。
如果您的情况不符合上述要求,Google不会向您公开提交者的电子邮件地址,唯一的选择就是在表单中提示他们。
The scenario goes:
Via Google Apps script, is it possible to retrieve the respondent's e-mail address in this manner? For specific reasons, I am not allowed to inquire the respondent's e-mail address. Retrieving the e-mail address in this manner also serves as verification so that it is verifiable which of the e-mail addresses I sent the form to have a response.
I am aware that if you have a field which contains the user's e-mail address, this is very do-able. There is even a tutorial specifically about it. However, I haven't seen a guide for the use case described above.
I have attempted using Session.getActiveUser().getEmail(). However, it seems that it only retrieves my own e-mail address (as it considers me, the person viewing the spreadsheet, as the active user).
解决方案This can only be done if you are using Google Apps for Business, Google Apps for Education, or Google Apps for Your Domain, and are having users on your domain fill out the form. In that case, you can use getRespondentEmail() to retrieve the submitter's email address.
If your situation doesn't meet the requirement above, Google does not expose the submitter's email address to you and your only option is to prompt them for it on the form.
更多推荐
检索Google表格答复者的电子邮件地址,而不要求表格中的电子邮件地址
发布评论