Example #1
0
        private static bool Send(string phone, string content, out string result)
        {
            SmsSend.SmsSendMod info = new SmsSend.SmsSendMod();
            info.ServerUrl = Config.SmsConfig.ServerUrl;
            info.AppId     = Convert.ToInt32(Config.SmsConfig.AppId);
            info.AppKey    = Config.SmsConfig.AppKey;
            info.Phone     = phone;
            info.Content   = content;
            SmsSend ss = new SmsSend(info);

            return(ss.Send(out result));
        }
        /// <summary>
        /// 发送信息。
        /// </summary>
        /// <param name="sm"></param>
        /// <returns></returns>
        private string SendInfo(Send_Mod sm)
        {
            SmsSend.SmsSendMod info = new SmsSend.SmsSendMod();
            info.ServerUrl = Config.SmsConfig.ServerUrl;
            info.AppId     = Convert.ToInt32(Config.SmsConfig.AppId);
            info.AppKey    = Config.SmsConfig.AppKey;
            info.Phone     = sm.Phone;
            info.Content   = sm.Content;
            SmsSend ss = new SmsSend(info);
            string  msg;
            bool    IsOk = ss.Send(out msg);

            if (IsOk)
            {
                return("0");
            }
            else
            {
                return(msg);
            }
        }