recently we met the issue.
There is no explicit auth or connect method in pop3 client, it seems the client will automatically connect to the server if any command is processed. I check the packages by Wireshark, the client will always send a “CAPA” command first to get the capabilities of the server and then use “USER” command to do the login.
But if the “CAPA” command is not supported and get a error message, the client will not try to login so the client is always not authorized and all operations go failure.
Here is the code sample: (based on C#)
var test = new Aspose.Email.Clients.Pop3.Pop3Client(“theip”, 110, Aspose.Email.Clients.SecurityOptions.None);
test.Username = “User1”;
test.Password = “P@ssword1”;
test.Timeout = 100000;
test.GreetingTimeout = 100000;
var thisMessage = test.FetchMessage(1);(just for sample)
the package that caught by WireShark is attached.
you can check in the package.
If the “CAPA” is returned, then the “USER” and “PASS” command were invoked and the client was authorized.
If the “CAPA” command met error, the client directly invoked “RETR” request to get the message so there was an unauthorized error.
CAPA.zip (1.5 KB)
Besides, you can see that the FetchMessage was failed, but the thisMessage object is not null, is a message object with all properties are almost empty. I think an exception should be thrown in this case, otherwise we cannot know whether the message retrieval is completed.
PS, the test based on the latest Aspose.Email for .Net (22.4). The pop server is built for test on local host and the RETR command is not implement yet.