2015-01-27 173 views
0

在使用lumisoft登录Outlook后,有没有办法检索登录信息?这是我的代码Lumisoft登录验证

private void Connect() 
     { 
      string m_pUserName = "[email protected]"; 
      string m_pPassword = "pass"; 
      string m_pServer = "imap-mail.outlook.com"; 


      IMAP_Client imap = new IMAP_Client(); 
      try 
      { 
       imap.Logger = new Logger(); 
       imap.Connect(m_pServer, 993, true); 

       imap.Login(m_pUserName, m_pPassword); 

       MessageBox.Show(imap.GreetingText); 

      } 
      catch (Exception x) 
      { 
       MessageBox.Show(this, "IMAP server returned: " + x.Message + " !", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error); 
       imap.Dispose(); 
      } 

     } 

如果凭据错误,它最终会抛出异常。 但是,如果他们是正确的,我想检索greetingText以外的信息。例如用户的电子邮件和密码登录等。

任何提示?

回答

0

我搜索的大部分信息并非全部都在IMAP_Client.AuthenticatedUserIdentity因此imap.AuthenticatedUserIdentity 会给我大部分我正在寻找的东西。 感谢和抱歉的麻烦。