Click here to Skip to main content
15,917,062 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Updated 16-Nov-14 20:42pm
v2
Comments
Thanks7872 17-Nov-14 2:44am    
If you are not familiar with the task you have been assigned than there are two options

1) Learn and implement it. If you face any issues doing the same,come here with code block you have issue with and ask specific question.

2) Find another employer.
Sinisa Hajnal 17-Nov-14 3:06am    
Convince your employer that your language (the one you're familiar with) makes better choice due to quickness of development (you don't have to learn new language) and better / faster / easier support.
Kornfeld Eliyahu Peter 17-Nov-14 3:09am    
And anything is better than VBA...
Sinisa Hajnal 17-Nov-14 3:24am    
Hmmm...PHP? VB6?
Richard MacCutchan 17-Nov-14 4:00am    
You've obviously never been to Luton. :)

1 solution

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());
           }
 
Share this answer
 
Comments
Member 10581986 7-Jan-16 13:15pm    
i tried the same code. Tt doesn't send any message and no error is reported.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900