本帖最后由 wuzheng321 于 2009-09-09 12:47:57 编辑

解决方案 »

  1.   

    http://topic.csdn.net/u/20090528/18/2e4ce4c9-c017-400e-8efe-b3292af87b88.html
      

  2.   

    EMobileMsgStatus status; //发送信息返回的状态
                    EMobileMsgType msgType = EMobileMsgType.TEXTSMS_AUTOSPLIT_MSGTYPE;  //定义信息发送格式为自动分割
                    string msgId = sentSmSComService.CreateUniqueID().ToString();   //对发送信息端口对象生成唯一的MessageID
                    short sSendPri = 32;    //定义发送信息级别
                    string signName = "";   //定义匿名
                    object splitCount = new object();
                    User user;
                    string content = "";
                    string mobileNo = "";
                    int count = userList.Count;
                    user = (User)userList[0];
                    if (user.MobileNo != null)
                    {
                        user = (User)userList[0];
                        content = "您绑定的" + count + "个" + user.SpName + "账号:" + "\r\n";
                        for (int i = 0; i < userList.Count; i++)
                        {
                            user = (User)userList[i];
                            content = content + "账号" + (i + 1) + ":" + user.UserName + "\r\n" + "密码:" + user.Password + "\r\n";
                            mobileNo = user.MobileNo;
                        }                }
                    else
                    {
                        content = "<<" + user.SpName + ">>对不起,此手机号尚未绑定账号.请打开'账号管理-绑定手机号'执行绑定.如有查询,请致电客服:021-54658795";
                        mobileNo = souceNumber.ToString();
                    }
                    if (sentSmSComService.ModemStatus == EMobileModemStatus.OK_STATUS)
                    {
                        System.Diagnostics.Debug.WriteLine(Thread.CurrentThread.Name);
                        status = this.sentSmSComService.SendMsg(msgId, mobileNo, content, out splitCount, msgType, signName, sSendPri, false, false);