问题
I wish to develop a sms application in C#.net.
So please help me by guiding me how to create such an application from scratch.
回答1:
Best thing to do would be get an account on a cheap SMS/Voice provider. I use Twilio for a ton of spare time stuff. Their service works great, and it's really cheap ($1 a month for a unique phone number, and $0.03 per SMS message). Another service is Tropo. They charge more per month for a phone number, but less for each message.
Twilio also provides an open source C# API wrapper.
回答2:
I was using ActiveExprerts SMS and MMS Toolkit, they have a good example on how you develop stuff from it and it supports a lot of GSM Modems, Mobile Phone and SMPP SMSC Providers. If you need further help I have an old project which I implemented but its in VB. Have a try and let me know its in http://www.activexperts.com/xmstoolkit/
回答3:
I would guess you should go for the free service provider ie. way2sms or 160by2
Download full Source Code Here
for that you can integrate the Api for that in your application.
Here is the Code
http://alfasms.alfredfrancis.in/?uname=YOUR_USERNAME&pass=YOUR_PASSWORD&to=YOUR_RECEPTIANT&mess=YOUR_MESSAGE&gateway=YOUR_GATEWAY
>> Where YOUR_USERNAME your way2sms/160by2/fullonsms/sms440/site2sms USERNAME(ie mobile number)
>>Where YOUR_PASSWORD your way2sms/160by2/fullonsms/sms440/site2sms PASSWORD.
>> Where YOUR_RECEPTIANT is to which number you want to send SMS.
>> Where YOUR_MESSAGE is the message you want to send.
>> Where YOUR_GATEWAY is way2sms/160by2/fullonsms/sms440/site2sms.
string connectionString = "<a href="http://alfasms.alfredfrancis.in/?uname=YOUR_USERNAME&pass=YOUR_PASSWORD&to=YOUR_RECEPTIANT&mess=YOUR_MESSAGE&gateway=YOUR_GATEWAY">http://alfasms.alfredfrancis.in/?uname=YOUR_USERNAME&pass=YOUR_PASSWORD&to=YOUR_RECEPTIANT&mess=YOUR_MESSAGE&gateway=YOUR_GATEWAY</a>";
try
{
System.IO.Stream SourceStream = null;
System.Net.HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(connectionString);
myRequest.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse webResponse = (HttpWebResponse)myRequest.GetResponse();
SourceStream = webResponse.GetResponseStream();
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
string str = reader.ReadLine();
}
catch (Exception ex)
{
}
来源:https://stackoverflow.com/questions/3464474/sms-application