Login() public method

Login to specified Imap host and default port (143)
public Login ( string sHost, string sUserId, string sPassword ) : void
sHost string Imap Server name
sUserId string User's login id
sPassword string User's password
return void
Example #1
0
 public MyImapWrapper(string imapHost, ushort imapPort, string imapUser, string imapPassword)
 {
     _imapContext = new Imap();
     try
     {
         _imapContext.Login(imapHost, imapPort, imapUser, imapPassword, true);
     }
     catch (Exception)
     {
         //TODO: Implement login exception
         throw;
     }
 }
		public override Boolean Check ()
		{
			Imap imap = new Imap();
			imap.Login(ServerAddress, Email, Password);

			imap.ExamineFolder("Inbox");

			ArrayList messages = new ArrayList();
			imap.SearchMessage(new string[] { "UNSEEN" }, true, messages);

			for (int i = messages.Count - 1; i >= 0; i--)
			{
				if ((string)messages[i] == "")
					messages.RemoveAt(i);
			}

			return messages.Count > 0;
		}