在多个号码上发送消息 [英] Sending message on multiple numbers

查看:72
本文介绍了在多个号码上发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中的应用程序正在单个手机号码上发送消息,该手机号码我在文本框中输入....我正在使用mysql数据库,我希望短信应发送到"cellno"字段中存在的所有手机号码在我的sql数据库中,我的代码适用于单个号码,我如何在多个手机上发送它...?

解决方案

您将必须发送一个单独的号码我想每个数字都应留言.因此,要么在创建请求的数字列表中循环,要么使用并行方法并产生一个任务以将消息发送到整个列表中的每个数字.


听起来....

听说过"for"循环吗?

  for ( int  i =  0 ;我< 联系人数量; i ++)
{
  sendMsg(port,p,p1);
} 




但这听起来不像是我的合法程序....向手机发送垃圾邮件.


使用comas(,)分隔移动电话号码很可能会解决您的问题

My application in c# is sending message on a single mobile number which i enter in text box.... i am using mysql database i want that sms should send to all mobile numbers which are present in the field of "cellno" in my sql database, my code is working for single number how can i send it on more than one mobile...?

解决方案

You will have to send a separate message for each number, I think. So either loop around the list of numbers creating requests, or use a parallel approach and spawn a task to send a message to each number on the whole list.


As much as I hate how this sounds.....

Ever hear of a "for" loop?

for (int i =0; i < number of contacts; i++)
{
  sendMsg(port, p, p1);
}




But it does not sound like a legitimate type of program to me.... spamming cell phones.


seperate mobile numbers with comas(,) most probably your problem will be solved


这篇关于在多个号码上发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆