Gmail API - size limit batching of emails with attachments?

落花浮王杯 提交于 2020-01-25 11:00:07

问题


My application often requires to upload bulk emails to user's Gmail account. Currently, I am using JavaMail IMAP for doing this. However, I am now testing Gmail API (Java). A batch size of 25 emails with (approx 50KB) works perfectly and super fast outperforming IMAP by 4 times.

However, when I try to batch emails with attachment of 1MB, the batching is failing after 6 emails. I know that the API recommends a "media/resumable" upload https://developers.google.com/gmail/api/guides/uploads if size of upload is >5MB. Is the 5MB limit, applicable to entire batch or individual emails?

Also, with around 5MB of today payload with 5 emails, IMAP is outperforming both batch or media upload with the API by almost 20%.

来源:https://stackoverflow.com/questions/30022893/gmail-api-size-limit-batching-of-emails-with-attachments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!