GmailApp getAliases 不包括帐户的主要电子邮件地址

GmailApp getAliases doesn't include the account's main email address

GmailApp getAliases 对于获取别名/导入帐户列表很有用,它有效。

但返回的列表不包括帐户的主要电子邮件地址。

如何从 GmailApp 获取帐户的主要电子邮件地址?(无需在 Google Apps 脚本中对其进行硬编码)

在这种情况下,我想提出以下脚本。

const emailAddress = Session.getActiveUser().getEmail();
参考: