Hi,
so, I need to read all emails from email server (public, free, web provider), with POP3. I use OpenPop library (I do some research, and still not sure about that choice).
Received emails I want to save in my database. To identify, whether email already is in database i want to use message-ID (save it in separate column). It is uniq value for every email in my inbox, right?
But, what the problem:
I received almost all emails with no problem. Emails with problem (with null message-ID) were from CodeProject newsletter and from myself (I send some emails from C# code for test). Those emails were received with messageID == null.
How is that possible, can anybody explain me?
Here is my test code:
pop3Client = new Pop3Client();
if (pop3Client.Connected)
pop3Client.Disconnect();
pop3Client.Connect("poczta.o2.pl", 995, true);
pop3Client.Authenticate("mnd017@com", "231231");
int count = pop3Client.GetMessageCount();
for (int i = count; i >= 1; i -= 1)
{
if (IsDisposed)
return;
Application.DoEvents();
Message message = pop3Client.GetMessage(i);
try
{
}
catch (Exception e)
{
fail++;
}
}