我使用 AE.NET.Mail 来阅读我的电子邮件正文。
但所有这些身体都是空的!
我的代码如下:
// Connect to the IMAP server. The 'true' parameter specifies to use SSL
// which is important (for Gmail at least)
ImapClient ic = new ImapClient("imap.soscharge.com", "main@domain.tk", "123",
ImapClient.AuthMethods.Login, 143, false);
// Select a mailbox. Case-insensitive
ic.SelectMailbox("INBOX");
Console.WriteLine(ic.GetMessageCount());
// Get the first *11* messages. 0 is the first message;
// and it also includes the 10th message, which is really the eleventh ;)
// MailMessage represents, well, a message in your mailbox
MailMessage[] mm = ic.GetMessages(0, 10);
foreach (MailMessage m in mm)
{
Response.Write(m.Sender + "<br /><br />");
}
foreach (MailMessage m in mm)
{
Response.Write(m.Sender + "<br /><br />");
}
// Probably wiser to use a using statement
ic.Dispose();
我的电子邮件是 utf-8 编码的。
有什么问题,我怎样才能抓住那些尸体?
提前致谢