views:

19

answers:

1

I am using Google API to test below code:

MailItemService mailItemService = new MailItemService(domain, "Sample Migration Application");
mailItemService.setUserCredentials(userEmail, password);

MailItemEntry entry = new MailItemEntry();
entry.Rfc822Msg = new Rfc822MsgElement(rfcTextOfMessage);

Referring to this Link .

  1. I used Sample Value given for "rfcTextOfMessage". But how to change To,Send and Date values for different mails?

Is there any way to get this format?

Note: I am using C#

A: 

In this example rfcTextOfMessage should be a string containing the actual email. If you're migrating messages this would simply be a string containing the entire raw message (headers, body, and encoded attachments) you want to load into google. The format of the message is rfc822; if you want to create a new message from scratch, or modify an existing one, simply edit the string (I'm not aware of any .Net classes which will output an rfc822 formatted string to make editing easier). If you're going to modify dates there's a tip here about doing that.

Guildencrantz