public bool Equals(MailConfiguration obj)
 {
     if (ReferenceEquals(null, obj))
     {
         return(false);
     }
     if (ReferenceEquals(this, obj))
     {
         return(true);
     }
     return(obj._Id == _Id && Equals(obj._Description, _Description) && Equals(obj._Host, _Host) && obj._Port == _Port && obj._EnableSsl.Equals(_EnableSsl) && obj._ApopAuthenticate.Equals(_ApopAuthenticate));
 }
Beispiel #2
0
 public void VaildTheObject()
 {
     if (string.IsNullOrEmpty(_LoginName) || string.IsNullOrEmpty(_Password))
     {
         throw new ApplicationException("用户名与密码不可为空");
     }
     if (_TheMailConfiguration == null)
     {
         throw new ApplicationException("必须选择一个配置文件");
     }
     if (!MailConfiguration.IsVaildId(_TheMailConfiguration.Id))
     {
         throw new ApplicationException("无效的配置文件,请联系管理员检查");
     }
 }
Beispiel #3
0
 public MailAccount(string loginName, string password, MailConfiguration config)
 {
     _LoginName           = loginName;
     _Password            = password;
     TheMailConfiguration = config;
 }