/// <summary> /// 获取Email账户信息 /// </summary> /// <returns></returns> private EmailUser GetEmailUser(EmailAccountType emailUserType) { //emailUserType = emailUserType == EmailUserType.Default ? EmailUserType._163 : emailUserType; XmlDataContext xmlCtx = new XmlDataContext(); var emailUserList = xmlCtx.GetXmlList <EmailUser>(); var emailUser = emailUserList.FirstOrDefault(z => z.Name == emailUserType.ToString()); if (emailUser == null) { LogUtility.EmailLogger.ErrorFormat("EmailUserType类型错误。传入类型:{0}", emailUserType.ToString()); } return(emailUser); }
public List <AutoSendEmail> GetAllList() { return(xmlCtx.GetXmlList <AutoSendEmail>()); }