0

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#

4

1 回答 1

0

在这个例子rfcTextOfMessage中应该是一个包含实际电子邮件的字符串。如果您正在迁移邮件,这将只是一个包含您要加载到 google 中的整个原始邮件(标题、正文和编码附件)的字符串。消息的格式是rfc822;如果您想从头开始创建新消息或修改现有消息,只需编辑字符串(我不知道有任何 .Net 类会输出 rfc822 格式的字符串以使编辑更容易)。如果您要修改日期,这里有一个提示。

于 2010-02-26T18:27:15.640 回答