/// <summary> /// Raises <b>Authenticate</b> event. /// </summary> /// <param name="user">User name.</param> /// <param name="password">Password.</param> /// <returns>Returns event args.</returns> private POP3_e_Authenticate OnAuthenticate(string user,string password) { POP3_e_Authenticate eArgs = new POP3_e_Authenticate(user,password); if(this.Authenticate != null){ this.Authenticate(this,eArgs); } return eArgs; }
private void m_pPop3Server_Session_Authenticate(object sender,POP3_e_Authenticate e) { // Check that user is allowed to access this service if((m_pApi.GetUserPermissions(e.User) & UserPermissions_enum.POP3) == 0){ e.IsAuthenticated = false; return; } e.IsAuthenticated = Authenticate(((POP3_Session)sender).RemoteEndPoint.Address,e.User,e.Password); }