Trying to make a "user proof" (yea right) app for android. What is the best way to verify that the server info and login info is correct?
With POP3, I see that there is a VerifyPopConnection which I believe verifys that we have a valid server name and settings... and there is a VerifyPopLogin which I believe verifies that the login username and password are valid. But then I read that Pop3BeginSession, which is optional, also checks these.
So the question is, if I want to do some error checking and passback information to the user that their server and/or login info is not correct... is it best to call both VerifyPop methods one after the other or use one OR the other OR use Pop3BeginSession? Seems calling both VerifyPop commands will just slow down the login process? I suppose I could "verify" these settings when they are entered in the setup and then just check the Pop3BeginSession for a failure at the actual login time???
The same I guess applies to IMAP accounts. The only thing I believe I can check is the actual IMAP.Connect method.
What do you recommend we do for these.
asked Jan 28 '16 at 21:07
I will provide new methods to allow for the connect and authenticate to be in separate method calls. This would be the best solution. I'll also add a ConnectFailReason property that will be exactly the same as the Socket.ConnectFailReason.
If you need the best choice for what exists now, then I would recommend this: Don't call the Verify* methods up-front. If Pop3BeginSession fails, then follow up with a call to VerifyPopConnection. If that succeeds, then it's likely the login was invalid (and you could call VerifyPopLogin).
In any case, I realize this needs to be improved, and have the new methods likely by Monday.
answered Jan 29 '16 at 09:32