I'm trying to insert a message in a Gmail inbox using the Google Api for Javascript (14.0.0). When there is not any attachment it works fine, but when I try an email with a large attachment (~20MB), I've found that the response depends on the account where I'm inserting the message. This is the code which inserts the message:
gmail.users.messages.insert({
userId: this.googleId,
uploadType: 'resumable',
internalDateSource: 'dateHeader',
resource: message,
auth: this.auth_client
})
For some accounts this works good, but for another ones with the same attachment I get the following error:
<HEAD>
<TITLE>Request Entity Too Large</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Request Entity Too Large</H1>
<H2>Error 413</H2>
</BODY>
</HTML>
In the past, I used the uploadType
as multipart
and this error appeared always, but now with resumable
only for some accounts, even testing them with e-mails with the same size.
I have compare both account configurations and they seem pretty similar.
Is there some configuration I am missing?