hotmail アカウントのリストをチェックするソフトウェアを作成しています。OpenPop.NETライブラリを使用しています。奇妙なことに、通常は pop3 なしでログインできるため、パスワードが正しいと確信しているにもかかわらず、一部のアカウントでInvalid Password Exceptionが発生します。誰かが私に回答または pop3 以外の Hotmail 受信トレイに接続する別の方法を提供してくれるとありがたいです (Web ブラウザの使用はお勧めしません)。
接続に使用しているコードは次のとおりです。
Pop3Client client = new Pop3Client();
client.Connect("pop3.live.com", 995, true);
var username = file[i].Split(':')[0];
var pass = file[i].Split(':')[1];
try
{
client.Authenticate(username, pass); //I am pretty sure that username,pass holds the right values.
var msgs = client.GetMessageCount().ToString();
updateList(i, msgs); //updates a listbox with message count for the hotmail account
}
catch (OpenPop.Pop3.Exceptions.InvalidPasswordException)
{
updateList(i, "Invalid Password");
}
ありがとう。
編集:非稼働アカウントから取得したサーバーの応答は次のとおりです
The server didn't respond with +OK response. The response was: "-ERR mailbox could not be opened"