Example #1
0
 public static hMailServer.IInterfaceApplication GetEntity()
 {
     if (mailApp == null)
     {
         mailApp = MailAuthenticate();
     }
     return mailApp;
 }
Example #2
0
 public static hMailServer.IInterfaceApplication GetEntity()
 {
     if (mailApp == null)
     {
         mailApp = MailAuthenticate();
     }
     return(mailApp);
 }
Example #3
0
 private static hMailServer.IInterfaceApplication MailAuthenticate()
 {
     mailApp = new hMailServer.Application();
     IDictionary accountConfig = (IDictionary)ConfigurationManager.GetSection("mail/account");
     hMailServer.IInterfaceAccount account = mailApp.Authenticate(accountConfig["username"].ToString(), accountConfig["password"].ToString());
     if (account == null)
     {
         throw new MessageException() { message = "账号验证错误" };
     }
     return mailApp;
 }
Example #4
0
        private static hMailServer.IInterfaceApplication MailAuthenticate()
        {
            mailApp = new hMailServer.Application();
            IDictionary accountConfig = (IDictionary)ConfigurationManager.GetSection("mail/account");

            hMailServer.IInterfaceAccount account = mailApp.Authenticate(accountConfig["username"].ToString(), accountConfig["password"].ToString());
            if (account == null)
            {
                throw new MessageException()
                      {
                          message = "账号验证错误"
                      };
            }
            return(mailApp);
        }