0

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%.

Rahul
  • 49
  • 5
  • 5MB batch limit is for individual emails not for entire batch I think. When failing what is the error message you are getting? – SGC May 05 '15 at 21:09
  • Depending on the size of the email you are trying, you can increase the upload number say from 5 to 25, and then then uploads would fail. For me, it was with 1MB attachment size x 6 emails and above. – Rahul May 07 '15 at 08:34

0 Answers0