Andy,

The sample code presented below reproduces the "400" problem every
time. Load the the C# sample app in Sources\Samples\appsforyourdomain
\migration. Edit the file migrationsample.cs.

On line 115 replace this line:
entry.Rfc822Msg = new Rfc822MsgElement(GenerateRandomRfcText());

with these lines:
string s = GenerateRandomRfcText();
if (batchId == "0")
{
    s = s.Replace("Date: Mon, 16 Jul 2007 10:12:26 -0700",
        @"Date: Wed May 30 15:37:01 EDT 2001"
        );
}
entry.Rfc822Msg = new Rfc822MsgElement(s);

After this line:
MailItemFeed batchResult = mailItemService.Batch(domain,
destinationUser, entries);

Add these two lines:
Console.WriteLine("Batch feed size is {0}, inserted feed size is {1}",
    entries.Length, batchResult.Entries.Count);

Finally, replace this line:
MailItemFeed batchResults = BatchInsertMailItems(10);
With these two lines:
MailItemFeed batchResults = BatchInsertMailItems(1);
batchResults = BatchInsertMailItems(2);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
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-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to