コードに IMAP を組み込む方法を学ぼうとしています。S22.IMAP ライブラリでいくつかの簡単なテストを行いましたが、エラー(S22.IMAP Bad Server Response Exception)が発生しましたwe are connected
。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using S22.Imap;
using System.Net.Mail;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
using (ImapClient Client = new ImapClient("1.1.1.1", 143, "XXXXX", "XXXX", AuthMethod.Login, false))
{
Console.WriteLine("We are connected");
uint[] uids = Client.Search(SearchCondition.Unseen());
MailMessage[] messages = Client.GetMessages(uids);
}
}
}
}
例外は MailMessage 行にあります。
私はIMAPが初めてなので、これを手伝ってください。