Context : Mail.dll 3.0.21294.1630, licensed release
I'm trying to get messages from Exchange mailbox that contains corrupted email with Pop3 components.
Unfortunately, the program raises "MESSAGE CORRUPTED" exception (Pop3ResponseException)., although that I can correctly open those messages with Outlook.
const string K_Server = "outlook.office365.com";
const string K_eMail = "test@test.com";
const string K_Password = "xxxxxxxxxxxx";
try
{
using (Pop3 pop = new Pop3())
{
pop.ConnectSSL(K_Server, 995);
pop.Login(K_eMail, K_Password);
List<string> uids = pop.GetAll();
MailBuilder builder = new MailBuilder();
foreach (string s in uids)
{
byte[] data = pop.GetMessageByUID(s);
IMail iMail = builder.CreateFromEml(data);
Console.WriteLine(iMail.Subject);
}
}
}
catch (Exception)
{
Console.WriteLine(exc.Message);
}
Any help would be nice. Thanks.
Alain