コード例 #1
0
 /// <summary>
 /// 发送短信
 /// </summary>
 /// <param name="phone">电话号码</param>
 /// <param name="userName">申请用枪人</param>
 public static void send(string phone, string userName)
 {
     GSMModem gm = new GSMModem("COM" + Port.Get_ComMessage(), 9600);
     gm.Open();
     gm.SendMsg(phone, "申请用枪人: " + userName + " | 短信验证码为:" + new System.Random().Next(0,9999) + " | 请妥善保管!" );
     gm.Close();
 }
コード例 #2
0
        /// <summary>
        /// 发送短信
        /// </summary>
        /// <param name="phone">电话号码</param>
        /// <param name="userName">申请用枪人</param>
        public static void send(string phone, string userName)
        {
            GSMModem gm = new GSMModem("COM" + Port.Get_ComMessage(), 9600);

            gm.Open();
            gm.SendMsg(phone, "申请用枪人: " + userName + " | 短信验证码为:" + new System.Random().Next(0, 9999) + " | 请妥善保管!");
            gm.Close();
        }