////public new ImapConnection Connection ////{ //// get { return (ImapConnection)base.Connection; } //// set { base.Connection = value; } ////} public override void Authenticate(MailUserInfo userInfo) { var command = Connection.CreateCommand(); string password = GetPassword(userInfo.Password); string commandStr = string.Format(Imap.IMAP_LOGIN + " {0} {1}", userInfo.Email, password); command.Command = commandStr; command.ExecuteCommand(hideCommandInLog: true); LoggerHolders.ConsoleLogger.Log(commandStr.Replace(password, new string('*', password.Length))); LoggerHolders.ConsoleLogger.Log(command.Response, LogType.Success); }
public bool SaveMailUserInfo(string[] userIdList, int mailId) { foreach (string userId in userIdList) { MailUserInfo info = new MailUserInfo { Id = Guid.NewGuid(), UserInfoId = int.Parse(userId), MailInfoId = mailId }; CurrentDBSession.MailUserInfoDal.AddEntity(info); CurrentDBSession.SaveChanges(); } return(true); }