I am using Google API to test below code:
MailItemService mailItemService = new MailItemService(domain, "Sample Migration Application");
mailItemService.setUserCredentials(userEm开发者_高级运维ail, password);
MailItemEntry entry = new MailItemEntry();
entry.Rfc822Msg = new Rfc822MsgElement(rfcTextOfMessage);
Referring to this Link .
- 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#
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.
精彩评论