Hi Dave,

The error that you are getting can be because the text of rfc822Msg
element has \n instead of \r\n. Please check your RFC message to
ensure each line terminates with \r\n.

Thanks,
Megha

On Dec 13, 9:25 am, Dave C <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The last response helped a lot. I've made some progress. However, I
> get the server response, "code='400' reason='Invalid RFC822 Message:
> Missing date info for message'" for every entry I submit. I've tried a
> untold variations and it always ends up with this Missing Date Info
> error. I don't see the problem because the Date field is specified
> with correct syntax for the rfc822 entry. Does anyone have any ideas?
> Originally, I was trying the example in the Developers Guide but I get
> the same error when that example is used exactly. I've entered the
> submission info and the server response below in case there is
> something I'm missing.
>
> Thank you, Dave
>
> [The Submission]
>
> <?xml version="1.0" encoding="utf-8"?>
> <feed xmlns="http://www.w3.org/2005/Atom"; xmlns:batch="http://
> schemas.google.com/gdata/batch" xmlns:gd="http://schemas.google.com/g/
> 2005">
> <entry>
> <category scheme='http://schemas.google.com/g/2005#kind'term='http://
> schemas.google.com/apps/2006#mailItem'/>
> <apps:rfc822Msg xmlns:apps='http://schemas.google.com/apps/2006'>
> <![CDATA[
>
> Message-ID:
> <[EMAIL PROTECTED]>
> Date: Wed, 12 Dec 2007 16:01:44 -0700
> From: "David Chugg" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Lunch on Monday
> MIME-Version: 1.0
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> A super duper email message.  Would you like to have dinner last week?
>
> ]]>
> </apps:rfc822Msg>
> <apps:mailItemProperty value='IS_STARRED' xmlns:apps='http://
> schemas.google.com/apps/2006' />
> <apps:mailItemProperty value='IS_UNREAD' xmlns:apps='http://
> schemas.google.com/apps/2006' />
> <apps:label labelName='Event Invitations' xmlns:apps='http://
> schemas.google.com/apps/2006' />
> <apps:label labelName='Friends' xmlns:apps='http://schemas.google.com/
> apps/2006' />
> <batch:id>0</batch:id>
> </entry>
> <entry>
> <category scheme='http://schemas.google.com/g/2005#kind'term='http://
> schemas.google.com/apps/2006#mailItem' />
> <apps:rfc822Msg xmlns:apps='http://schemas.google.com/apps/2006'>
> <![CDATA[
>
> Message-ID:
> <[EMAIL PROTECTED]>
> Date: Wed, 12 Dec 2007 15:47:56 -0700
> From: [EMAIL PROTECTED]
> To: "David Chugg" <[EMAIL PROTECTED]>
> Subject: Lunch on Tuesday
> MIME-Version: 1.0
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> This is the body of the email message.  Would you like to have lunch
> this week?
>
> ]]>
> </apps:rfc822Msg>
> <apps:mailItemProperty value='IS_INBOX' xmlns:apps='http://
> schemas.google.com/apps/2006' />
> <apps:label labelName='Important' xmlns:apps='http://
> schemas.google.com/apps/2006' />
> <apps:label labelName='Business' xmlns:apps='http://schemas.google.com/
> apps/2006' />
> <batch:id>1</batch:id>
> </entry>
> </feed>
>
> [The Server Response]
>
> <?xml version='1.0' encoding='UTF-8'?>
> <atom:feed xmlns:atom='http://www.w3.org/2005/Atom'
>  xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
>  xmlns:batch='http://schemas.google.com/gdata/batch'
>  xmlns:apps='http://schemas.google.com/apps/2006'>
> <atom:id>https://apps-apis.google.com/a/feeds/migration/2.0/
> ddchugg.mooo.com/dave/mail</atom:id>
> <atom:updated>2007-12-13T17:13:21.368Z</atom:updated>
> <atom:title type='text'>Batch Feed</atom:title>
> <atom:link rel='http://schemas.google.com/g/2005#feed'
>  type='application/atom+xml'
>  
> href='https://apps-apis.google.com/a/feeds/migration/2.0/ddchugg.mooo.com/d...>
> <atom:link rel='http://schemas.google.com/g/2005#post'
>  type='application/atom+xml'
>  href='https://apps-apis.google.com/a/feeds/migration/2.0/
> ddchugg.mooo.com/dave/mail'/>
> <atom:link rel='http://schemas.google.com/g/2005#batch'
>  type='application/atom+xml'
>  href='https://apps-apis.google.com/a/feeds/migration/2.0/
> ddchugg.mooo.com/dave/mail/batch'/>
> <atom:entry><atom:id>0</atom:id>
> <atom:updated>2007-12-13T17:13:21.368Z</atom:updated>
> <atom:title type='text'>Error</atom:title>
> <atom:content type='text'>Invalid RFC 822 Message: Missing date info
> for message</atom:content>
> <batch:id>0</batch:id>
> <batch:status code='400' reason='Invalid RFC822 Message: Missing date
> info for message'/>
> </atom:entry>
> <atom:entry>
> <atom:id>1</atom:id>
> <atom:updated>2007-12-13T17:13:21.371Z</atom:updated>
> <atom:title type='text'>Error</atom:title>
> <atom:content type='text'>Invalid RFC 822 Message: Missing date info
> for message</atom:content>
> <batch:id>1</batch:id>
> <batch:status code='400' reason='Invalid RFC 822Message: Missing date
> info for message'/>
> </atom:entry>
> </atom:feed>
>
> On Dec 10, 4:19 pm, Dave C <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I am trying to Migrate email messages using the Google Apps Email
> > Migration API. C++ and curl is being used. I am able to Authenticate
> > and submit a batch job. The batch submission works fine and I'm
> > getting valid responses that tell me that processing the submission
> > fails. Some of these I've fixed but I'll present the ones below that
> > are failing.
>
> > I'm simply using the batch two-item feed example that is provided in
> > the Google Apps Email Migration API Developer's Guide. I removed the
> > ", < and < entries and surrounded the RFC 822 message in
> > <CDATA>RFC 822 message</CDATA>. The problem is that the following
> > items
>
> > Message-ID:
> > <[EMAIL PROTECTED]>
> > From: 'Elizabeth Bennet' <[EMAIL PROTECTED]>
> > To: 'Fitzwilliam Darcy' <[EMAIL PROTECTED]>
>
> > fail because
>
> > <batch:interrupted reason='org.xml.sax. SAXParseException: Element
> > type "c
> > 8acb6980707161012i5d395392p5a6d8d14a858
> > " must be followed by either attribute specifications,
> > ">"('>') or "/>"('/>').' parsed='0'
> > success='0' error='0' unprocessed='0'/>
>
> > I've tried both > and /> and the same error message is still returned.
>
> > I also have the following questions regarding the Google Apps Email
> > Migration.
>
> > 1) The JavaMail library is recommended to construct the RFC 822
> > messages. However, I'm using C++. Is there a library for C++? Is there
> > a program that will generate the constructs that I can then copy and
> > paste from for testing purposes?
>
> > 2) How are contacts handled? The contact information and examples in
> > the Common Elements: "Kinds" directory seems quite different from the
> > examples in the API Developer's Guide and the Reference Guide. How do
> > I use the Common Elements: "Kinds" contacts information to get
> > contacts to migrate?
>
> > 3) Does the Email Migration only provide for inserts? Can updates,
> > deletes, and other operations be done?
>
> > 4) What can currently be done (updates, deletes, etc.)  with contacts
> > using the Common Elements information-using any of the available APIs?
>
> > 5) What documentation needs to be read to provide me with a background
> > to write and troubleshoot the Email Migration API code?
>
> > Thank you,
>
> > Dave Chugg
--~--~---------~--~----~------------~-------~--~----~
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