From 852481b917ba6345492efb1f54ca4283dc86450a Mon Sep 17 00:00:00 2001 From: claudiamurialdo <33756655+claudiamurialdo@users.noreply.github.com> Date: Thu, 25 May 2023 11:56:54 -0300 Subject: [PATCH] GetNextUID was not working for POP3SessionOpenPop. (#819) --- dotnet/src/dotnetframework/GxMail/POP3SessionOpenPop.cs | 1 - dotnet/src/dotnetframework/GxMail/Pop3MailKit.cs | 1 - dotnet/src/dotnetframework/GxMail/Pop3SessionBase.cs | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dotnet/src/dotnetframework/GxMail/POP3SessionOpenPop.cs b/dotnet/src/dotnetframework/GxMail/POP3SessionOpenPop.cs index 296f49a07..45cb1e583 100644 --- a/dotnet/src/dotnetframework/GxMail/POP3SessionOpenPop.cs +++ b/dotnet/src/dotnetframework/GxMail/POP3SessionOpenPop.cs @@ -35,7 +35,6 @@ public override void Login(GXPOP3Session sessionInfo) client.Authenticate(UserName, Password, OpenPop.Pop3.AuthenticationMethod.Auto); count = client.GetMessageCount(); uIds = client.GetMessageUids(); - uIds.Insert(0, string.Empty); } catch (PopServerNotAvailableException e) { diff --git a/dotnet/src/dotnetframework/GxMail/Pop3MailKit.cs b/dotnet/src/dotnetframework/GxMail/Pop3MailKit.cs index ce6e9292a..0cb0ea71a 100644 --- a/dotnet/src/dotnetframework/GxMail/Pop3MailKit.cs +++ b/dotnet/src/dotnetframework/GxMail/Pop3MailKit.cs @@ -58,7 +58,6 @@ public override void Login(GXPOP3Session sessionInfo) BasicAuth(_sessionInfo, client); count = client.Count; uIds = (List)client.GetMessageUids(); - /*uIds.Insert(0, string.Empty);*/ } catch (NotSupportedException e) diff --git a/dotnet/src/dotnetframework/GxMail/Pop3SessionBase.cs b/dotnet/src/dotnetframework/GxMail/Pop3SessionBase.cs index f427e1d2c..f59a38dc0 100644 --- a/dotnet/src/dotnetframework/GxMail/Pop3SessionBase.cs +++ b/dotnet/src/dotnetframework/GxMail/Pop3SessionBase.cs @@ -54,7 +54,7 @@ public virtual string GetNextUID(GXPOP3Session session) if (lastReadMessage == count) { LogDebug("No messages to receive", "No messages to receive", MailConstants.MAIL_NoMessages, log); - return ""; + return string.Empty; } int nextMessage = lastReadMessage + 1; int zeroBasedIndexForNextMessage = nextMessage - 1;