Esempio n. 1
0
 /// <summary>
 /// 保存邮件配置信息
 /// </summary>
 public static void SaveEmailConfig(EmailConfigInfo emailConfigInfo)
 {
     lock (_locker)
     {
         if (_iconfigstrategy.SaveEmailConfig(emailConfigInfo))
         {
             _emailconfiginfo = null;
         }
     }
 }
Esempio n. 2
0
        private static MallConfigInfo _mallconfiginfo = null;//商城配置信息

        /// <summary>
        /// 静态构造函数
        /// </summary>
        static Emails()
        {
            _iemailstrategy = BMAEmail.Instance;
            _emailconfiginfo = BMAConfig.EmailConfig;
            _mallconfiginfo = BMAConfig.MallConfig;
            _iemailstrategy.Host = _emailconfiginfo.Host;
            _iemailstrategy.Port = _emailconfiginfo.Port;
            _iemailstrategy.UserName = _emailconfiginfo.UserName;
            _iemailstrategy.Password = _emailconfiginfo.Password;
            _iemailstrategy.From = _emailconfiginfo.From;
            _iemailstrategy.FromName = _emailconfiginfo.FromName;
        }
Esempio n. 3
0
 /// <summary>
 /// 重置邮件配置信息
 /// </summary>
 public static void ResetEmail()
 {
     lock (_locker)
     {
         _emailconfiginfo = BMAConfig.EmailConfig;
         _iemailstrategy.Host = _emailconfiginfo.Host;
         _iemailstrategy.Port = _emailconfiginfo.Port;
         _iemailstrategy.UserName = _emailconfiginfo.UserName;
         _iemailstrategy.Password = _emailconfiginfo.Password;
         _iemailstrategy.From = _emailconfiginfo.From;
         _iemailstrategy.FromName = _emailconfiginfo.FromName;
     }
 }
Esempio n. 4
0
 /// <summary>
 /// 保存邮件配置
 /// </summary>
 /// <param name="configInfo">邮件配置信息</param>
 /// <returns>是否保存结果</returns>
 public bool SaveEmailConfig(EmailConfigInfo configInfo)
 {
     return SaveConfigInfo(configInfo, IOHelper.GetMapPath(_emailconfigfilepath));
 }
Esempio n. 5
0
 /// <summary>
 /// 保存邮件配置信息
 /// </summary>
 public static void SaveEmailConfig(EmailConfigInfo emailConfigInfo)
 {
     lock (_locker)
     {
         if (_iconfigstrategy.SaveEmailConfig(emailConfigInfo))
             _emailconfiginfo = null;
     }
 }