Hello Emmanuel

I tried to migrate your message using Python Client library and I was able 
to migrate it as it is.
The function 
here<http://code.google.com/p/gdata-python-client/source/browse/src/gdata/apps/migration/service.py#57>also
 uses Base64 encoding. I am currently looking to find out the .NET 
equivalent for it.
I will update the thread as soon as possible. For the time, here is the 
Python code that I used.

service = service.MigrationService(domain=domain, source='sample')
service.SetOAuthInputParameters(
        gdata.auth.OAuthSignatureMethod.HMAC_SHA1,
        CONSUMER_KEY, CONSUMER_SECRET)
        
request_token = service.FetchOAuthRequestToken()
service.SetOAuthToken(request_token)
auth_url = service.GenerateOAuthAuthorizationURL()
print auth_url
raw_input('Manually go to the above URL and authenticate.'
              'Press enter after authorization.')
service.UpgradeToOAuthAccessToken()
mail_item_properties = ['IS_INBOX', 'IS_STARRED']
mail_labels = ['Imported']
message = ("Received: by 10.143.160.15 with HTTP; Mon, 16 Jul 2007 10:12:26 
-0700 (PDT)\r\n"
            "Message-ID: <[email protected]>\r\n"
            "Date: Mon, 16 Jul 2007 10:12:26 -0700\r\n"
            "From: \"Mr. Serious\" <[email protected]>\r\n"
            "To: \"Mr. héhéhéhé\" <[email protected]>\r\n"
            "Subject: hébé Subject \r\n"
            "MIME-Version: 1.0\r\n"
            "Content-Type: text/plain; charset=utf-8\r\n"
            "Content-Transfer-Encoding: quoted-printable\r\n"
            "Content-Disposition: inline\r\n"
            "Delivered-To: [email protected]\r\n"
            "\r\n"
            "ééé\r\n"
            "\r\n")

print message

service.ImportMail(user_name='admin',
                             mail_message=message,
                             mail_item_properties=mail_item_properties,
                             mail_labels=mail_labels)

-- 
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/-/k9OS9G7LFN0J.
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.

Reply via email to