You specify the size of the emails to be found in Megabyte. Gmail users get 15GB of free cloud storage via Google Drive, but if you send and receive a large volume of emails with attachments, you may find your storage capacity hovering around zero.The API docs are incredibly confusing because they appear to state that you need to make multiple calls to rest endpoints to upload multiple files. It turns out that my MimeMessage was generated correctly, however, if the attachments included in the MimeMessage are larger than 5MB, you need to use a different Gmail API send () method. Gmail find emails with large attachments 1.