Ejemplo n.º 1
0
 protected void SendSystemMsg2User(MessageSet setting, Dictionary <string, string> msgParams)
 {
     if (setting.IsSendMsg)
     {
         Message.SendS2UMsg(MsgService.user.UserName, setting.MessageTitle, this.ReplaceTemplate(setting.MessageTemplate, msgParams));
     }
     if (setting.IsSendMail)
     {
         MsgService.SendMail(MsgService.user.Email, setting.MailTitle, this.ReplaceTemplate(setting.MailTemplate, msgParams));
     }
     if (setting.IsSendSMS)
     {
         MsgService.SendSMS(MsgService.user.Mobile, this.ReplaceTemplate(setting.SMSTemplate, msgParams));
     }
 }
Ejemplo n.º 2
0
 protected void SendSystemMsg2Mger(MessageSet setting, Dictionary <string, string> msgParams)
 {
     if (setting.IsSendMsg)
     {
         Message.SendSysMsg(setting.MessageTitle, this.ReplaceTemplate(setting.MessageTemplate, msgParams));
     }
     if (setting.IsSendMail && !string.IsNullOrEmpty(ConfigProvider.Configs.ManagerMail))
     {
         string[] array = ConfigProvider.Configs.ManagerMail.Split(new char[]
         {
             ','
         });
         for (int i = 0; i < array.Length; i++)
         {
             string text = array[i];
             if (ValidateUtils.IsEmail(text))
             {
                 MsgService.SendMail(text, setting.MailTitle, this.ReplaceTemplate(setting.MailTemplate, msgParams));
             }
         }
     }
     if (setting.IsSendSMS && !string.IsNullOrEmpty(ConfigProvider.Configs.ManagerMobile))
     {
         string[] array = ConfigProvider.Configs.ManagerMobile.Split(new char[]
         {
             ','
         });
         for (int i = 0; i < array.Length; i++)
         {
             string text = array[i];
             if (ValidateUtils.IsMobilePhone(text))
             {
                 MsgService.SendSMS(text, this.ReplaceTemplate(setting.SMSTemplate, msgParams));
             }
         }
     }
 }
Ejemplo n.º 3
0
        public static int SendSMSCheckCode(string strToMobile, string strContent, string strValidateCode)
        {
            string empty = string.Empty;

            return(MsgService.SendSMS(strToMobile, "CheckCode", strContent, strValidateCode, ref empty));
        }
Ejemplo n.º 4
0
        public static int SendSMS(string strToMobile, string strContent)
        {
            string empty = string.Empty;

            return(MsgService.SendSMS(strToMobile, "Normal", strContent, string.Empty, ref empty));
        }
Ejemplo n.º 5
0
 public static bool SendMail(string strReciveMail, string strSubject, string strMailBody, bool boolIsSSL, out string strResult)
 {
     return(MsgService.SendMail(ConfigProvider.Configs.SiteName, strReciveMail, strSubject, strMailBody, boolIsSSL, out strResult));
 }
Ejemplo n.º 6
0
 public static bool SendMail(string strReciveMail, string strSubject, string strMailBody, out string strResult)
 {
     return(MsgService.SendMail(strReciveMail, strSubject, strMailBody, false, out strResult));
 }
Ejemplo n.º 7
0
        public static bool SendMail(string strReciveMail, string strSubject, string strMailBody)
        {
            string empty = string.Empty;

            return(MsgService.SendMail(strReciveMail, strSubject, strMailBody, out empty));
        }