예제 #1
0
        public void SendMassage2(string phone, string str)
        {
            lock (sync)
            {
                string canshu = phone;//手机号
                string sdst   = canshu;
                string smsg   = string.Format(str);

                WebReference.CSubmitState state = service.g_Submit(SmsAuth.SmsUserName, SmsAuth.SmsPassword, SmsAuth.CorpId, SmsAuth.PrdId, sdst, smsg);
                log.Info(string.Format("短信:号{0}-文{1}-结果-{2}-{3}-{4}-{5}", phone, smsg, state.MsgID, state.MsgState, state.State, state.Reserve));
            }
        }
예제 #2
0
        //发送短信
        public int SendMassage(string phone)
        {
            Random yzm      = new Random();
            int    yanzheng = yzm.Next(1000, 9999);

            string canshu = phone;//手机号
            string sdst   = canshu;
            string smsg   = string.Format("您好,您获得的验证码为:{0},3分钟内有效【比权网】", yanzheng);

            WebReference.CSubmitState state = service.g_Submit(SmsAuth.SmsUserName, SmsAuth.SmsPassword, SmsAuth.CorpId, SmsAuth.PrdId, sdst, smsg);


            log.Info(string.Format("短信:号{0}-文{1}-结果-{2}-{3}-{4}-{5}", phone, smsg, state.MsgID, state.MsgState, state.State, state.Reserve));
            return(yanzheng);
        }