我们最近使用 GMail API 发送了一封电子邮件。在电子邮件中,BCC 有 270 个收件人。我们从 googleapi 收到以下错误:错误 400:收件人太多,invalidArgument,
我的问题是:使用 Gmail API 发送的邮件中的收件人数量是否有限制?如果是这样的话,有多大?
最佳答案
是的,有。
根据this每封邮件的收件人数量上限为 100 个。
Recipients per message sent via SMTP (by POP or IMAP users) or the Gmail API Addresses in the To, Cc, and Bcc fields of a single email. Includes email sent using smtp-relay.gmail.com or smtp.gmail.com*
100
不确定此限制是否仅适用于第三方(例如您自己)还是一般情况。 API 的使用条款明确规定,不应滥用 API,同时向近 300 人发送邮件可能会被视为试图发送垃圾邮件。
作为替代方案,您可以将收件人计数分成适合限制的 block ,然后发送多封邮件以涵盖所有邮件。在您的情况下,您必须发送 3 封邮件:2x100 和 1x70。
不要忘记注释(在我链接的文档中的表格上方):
Sending limits are different if your organization uses the SMTP relay service to route outgoing mail through Google. Instead, go to sending limits for the SMTP relay service.
关于gmail-api - 使用 Gmail API 发送的邮件的收件人数量是否有限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60666087/