开发批量邮件系统所需的帮助 [英] Help needed in developing bulk messaging system

查看:62
本文介绍了开发批量邮件系统所需的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的雇主希望我在Visual Basic中为应用程序开发批量邮件系统,但我不熟悉该语言可以帮助我们开发系统吗

my employer wants meto develop a bulk messaging system in visual basic for application but am not familiar with the language can you help me guys in developing the system

推荐答案





你需要哪种类型的Bulk Messaging系统?



是否发送批量短信使用API​​或什么??



如果是在API的帮助下你可以选择任何一种语言,因为实现API短信非常容易


同时你可以使用C#winform





Hi,

which type of Bulk Messaging system you need to??

whether it send bulk SMS using API or what??

if it is with the help of API then you can choose any of the language because to implementing the API SMS is quite easy

Meanwhile you can use C# winform


//Your authentication key
           string user = "XXXXXXXXX";
           //Multiple mobiles numbers separated by comma
           string pass = "XXXXX";
           //Sender ID,While using route4 sender id should be 6 characters long.
           string send = "060000";
           //Your message to send, Add URL encoding here.
           string text = textBox2.Text;
           string priority = "dnd";
           string stype = "normal";
           string phone = textBox1.Text;

           //Prepare you post parameters
           StringBuilder sbPostData = new StringBuilder();
           sbPostData.AppendFormat("user={0}", user);
           sbPostData.AppendFormat("&pass={0}", pass);
           sbPostData.AppendFormat("&sender={0}", send);
           sbPostData.AppendFormat("&phone={0}", phone);
           sbPostData.AppendFormat("&text={0}", textBox2.Text);
           sbPostData.AppendFormat("&priority={0}", priority);
           sbPostData.AppendFormat("&stype={0}", stype);


           try
           {
               //Call Send SMS API
           string sendSMSUri = "http://bhashsms.com/api/sendmsg.php";
               //Create HTTPWebrequest
               HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(sendSMSUri);
               //Prepare and Add URL Encoded data
               UTF8Encoding encoding = new UTF8Encoding();
               byte[] data = encoding.GetBytes(sbPostData.ToString());
               //Specify post method
               httpWReq.Method = "POST";
               httpWReq.ContentType = "application/x-www-form-urlencoded";
               httpWReq.ContentLength = data.Length;
               using (Stream stream = httpWReq.GetRequestStream())
               {
                   stream.Write(data, 0, data.Length);
               }
               //Get the response
               HttpWebResponse response = (HttpWebResponse)httpWReq.GetResponse();
               StreamReader reader = new StreamReader(response.GetResponseStream());
               string responseString = reader.ReadToEnd();

               //Close the response
               reader.Close();
               response.Close();
               MessageBox.Show("Your SMS send successfully");
           }
           catch (SystemException ex)
           {
               MessageBox.Show(ex.Message.ToString());
           }


这篇关于开发批量邮件系统所需的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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