I am using Google API PHP Client. I am writing a program which imports bulk messages from one account to another account. To import, I am using the line:
$service->users_messages->import('me', $message, $options);
..where $message is the raw message which comes from $service->users_messages->get()
.
First, the program gets the list of messages from one account. User selects the messages he wants to import then clicks the Import button. The importing loops the selected messages and works fine, but there are some messages which contain large attachments. These messages will fail and return the Error 413 - Request entity too large.
I have read that I need to indicate that the upload type should be multipart. I am using Google API PHP Client and I don't see any methods, classes or options to add this upload type.
Any suggestions will be helpful. Thanks.