使用Windows应用程序发送短信

使用Windows应用程序发送短信

问题描述:

我要创建一个使用我可以发送短信到所需的手机号码一个双赢的形式。我曾尝试不同的方式来发送,但是没有成功地之一,这里有我的努力,这并没有奏效。 (这些都是随机的号码冒充)
的第一次尝试:

I want to create a win form using which I can send the SMS to desired mobile number. I have tried different ways to send, But not succeeded in one, here are my efforts, which didn't worked. (These are all random numbers for posing)
First Try:

using SmsClient;
SendSms oSendSMS = new SendSms();
MessageBox.Show(oSendSMS.send("1234567890", "1111", "Hello", "1234567890"));

第二次尝试:

HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=way2sms");

            HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
            System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
            string responseString = respStreamReader.ReadToEnd();
            respStreamReader.Close();
            myResp.Close();

第三次尝试:

using SMSClassLibrary;
    string status = "";
                CookieContainer cookie = Login.Connect("1234567890", "1111", out status);
                string[] siteParameters = Login.GetSiteParameters(cookie);
                MessageBox.Show(SendSMS.Send_Processing("1234567890", "jkdfhjnhsd", cookie, siteParameters));

任何一个可以请在以后的这些努力帮助?

Can any one please help in succeeding these efforts?

请参见 API的网站,其中声称 way2SMS提供者(你似乎使用,可根据您的网址而结尾&放大器;提供商= way2sms )不会再对非专用用户的工作

See the API's site, which claims the "Way2SMS" provider (which you seem to use, according to your URL which ends with &provider=way2sms) does not work anymore for non-dedicated users.