You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It is very similar to bug #1634 but now with a different exception. When trying to delete certain e-mails (that I suspect is malformed in some way) or possibly that it is a very large inbox with 20k+ emails - it throws this exception for certain e-mails and kills the whole Pop3Client. So even if I try catch and simply ignore and try to proceed, the client is disconnected.
The code is reading e-mails from an account at outlook.office365.com.
Platform (please complete the following information):
OS: Windows (debugging in Visual Studio 2022)
.NET Runtime: .NET runtime for Azure Functions / dotnet-isolated
.NET Framework: .NET 7
MailKit Version: 4.1.0.765
Exception
MailKit.Net.Pop3.Pop3ProtocolException
HResult=0x80131500
Message=Unexpected response from server:
Source=MailKit
StackTrace:
at MailKit.Net.Pop3.Pop3Engine.ReadResponse(Pop3Command pc, CancellationToken cancellationToken)
at MailKit.Net.Pop3.Pop3Engine.Run(Boolean throwOnError, CancellationToken cancellationToken)
at MailKit.Net.Pop3.Pop3Client.SendCommand(CancellationToken token, String command)
at MailKit.Net.Pop3.Pop3Client.DeleteMessage(Int32 index, CancellationToken cancellationToken)
To Reproduce
Sadly it is very hard to reproduce this issue and I've never seens this type of issue before (and I've been using the mailkit for many years). It seems to be a marketing or spam e-mail of some sort.
Expected behavior
At least if it fails, it would be great if it didn't throw an exception and stopped the flow. I expected e-mail to only be marked for deletion and then committed upon disconnect.
Code Snippets
I simply do a:
using (var mkPop3Client = new MailKit.Net.Pop3.Pop3Client())
{
for (int i = 0; i < mkPop3Client.Count; i++)
{
var message = mkPop3Client.GetMessage(i);
mkPop3Client.DeleteMessage(i);
}
mkPop3Client.Disconnect(true)
}
I emailed the log to you.
The text was updated successfully, but these errors were encountered:
Describe the bug
It is very similar to bug #1634 but now with a different exception. When trying to delete certain e-mails (that I suspect is malformed in some way) or possibly that it is a very large inbox with 20k+ emails - it throws this exception for certain e-mails and kills the whole Pop3Client. So even if I try catch and simply ignore and try to proceed, the client is disconnected.
The code is reading e-mails from an account at outlook.office365.com.
Platform (please complete the following information):
OS: Windows (debugging in Visual Studio 2022)
.NET Runtime: .NET runtime for Azure Functions / dotnet-isolated
.NET Framework: .NET 7
MailKit Version: 4.1.0.765
Exception
MailKit.Net.Pop3.Pop3ProtocolException
HResult=0x80131500
Message=Unexpected response from server:
Source=MailKit
StackTrace:
at MailKit.Net.Pop3.Pop3Engine.ReadResponse(Pop3Command pc, CancellationToken cancellationToken)
at MailKit.Net.Pop3.Pop3Engine.Run(Boolean throwOnError, CancellationToken cancellationToken)
at MailKit.Net.Pop3.Pop3Client.SendCommand(CancellationToken token, String command)
at MailKit.Net.Pop3.Pop3Client.DeleteMessage(Int32 index, CancellationToken cancellationToken)
To Reproduce
Sadly it is very hard to reproduce this issue and I've never seens this type of issue before (and I've been using the mailkit for many years). It seems to be a marketing or spam e-mail of some sort.
Expected behavior
At least if it fails, it would be great if it didn't throw an exception and stopped the flow. I expected e-mail to only be marked for deletion and then committed upon disconnect.
Code Snippets
I simply do a:
using (var mkPop3Client = new MailKit.Net.Pop3.Pop3Client())
{
for (int i = 0; i < mkPop3Client.Count; i++)
{
var message = mkPop3Client.GetMessage(i);
mkPop3Client.DeleteMessage(i);
}
mkPop3Client.Disconnect(true)
}
I emailed the log to you.
The text was updated successfully, but these errors were encountered: