If anybody is following my travails in attempting to create a message in Gmail using the migration API, I did make a bit of progress. The Content-Length value in the http header needs to be increased by the magic value of 22. I have no idea where this comes from, and it has no relation to the size of the message. But I am able to post a message now. Now my latest problem is that the API will not accept an attachment. An example is below. This same exact data, when sent into Gmail via IMAP, works fine. The error returned is 400 bad request, and the error message is "Permanent failure: BadAttachment". So now what is the problem? --Next_Item:_(A3CB49KFSA19)/1 Content-type: application/octet-stream; name="X.VBS" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="X.VBS" U2V0IFdTSFNoZWxsID0gV1NjcmlwdC5DcmVhdGVPYmplY3QoIldTY3JpcHQuU2hlbGwiKQ0K DQpTZXQgYXBwT3V0bCA9IFdzY3JpcHQuQ3JlYXRlT2JqZWN0KCJPdXRsb29rLkFwcGxpY2F0 aW9uIikNCg0KU2V0IG1haU1haWwgPSBhcHBPdXRsLkNyZWF0ZUl0ZW0oMCkNCg0KbWFpTWFp bC5SZWNpcGllbnRzLkFkZCgiQ2xheXRvbi5FYW1lcy5AYWNhZGlhLWlucy5jb20iKQ0KDQpt YWlNYWlsLlN1YmplY3QgPSAiVGVzdGluZyBPdXRsb29rIEVNQUlMIFRlc3QgIzAwMCINCg0K bWFpTWFpbC5Cb2R5ID0gIkNhbiBZb3UgU2VlIFRoaXMgLSBOb3RlIFRoZXJlIGlzIG5vIEZS T00gYWRkcmVzcyAtIHBsZWFzZSBsZXQgRGVubmlzIFJlZGZpZWxkIGtub3cgeW91IGdvdCB0 aGlzLiINCg0KbWFpTWFpbC5BdHRhY2htZW50cy5BZGQoIkM6XHRlbXBceC52YnMiKQ0KDQpt YWlNYWlsLlNlbmQNCg0KDQpTZXQgYXBwT3V0bCA9IE5vdGhpbmcNClNldCBtYWlNYWlsID0g Tm90aGluZw0KU2V0IHJlY01lc3NhZ2UgPSBOb3RoaW5nDQoNCg== --Next_Item:_(A3CB49KFSA19)/1--
-- You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/U0--pr211qAJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
