SMS Library in C# [closed]

核能气质少年 提交于 2019-12-05 04:38:57
NickAldwin

Have you tried using the System.Net.Mail functions to send mail to the email corresponding to the phone number?

e.g. 6566565656@vtext.com

(List of email domains here: http://www.tech-recipes.com/rx/939/sms_email_cingular_nextel_sprint_tmobile_verizon_virgin/)

EDIT: even bigger list here http://en.wikipedia.org/wiki/SMS_gateway

EDIT 2: Bigger list here, Wikipedia link no longer has as much information http://www.ukrainecalling.com/email-to-text.aspx

Use Gammu, this is a console application you can use it in any type of application, launch the application capture the output then process it, already i had done in my c# project. Gammu has capablity to connecting to any type of gsm modem

Judging from your comments, I'd say leasing a SMS gateway is the easier option. I don't have any experience with USA gateway providers, but from the ones I've worked with, I can say that they are all fairly simple. Most of good ones has .Net APIs ready for you, so you essentially just call SendSMS(string phonenumber, string message) on them. If they don't have any .Net APIs they ussually have webservices ready for you, which is a 1-click integration into Visual Studio.

A simple google search came up with quite a few providers :)

http://www.google.dk/search?hl=da&q=sms+gateway+usa&meta=&aq=f&oq=

  1. Sending SMS is no longer free, ofcourse all ISPs dont want their customers to get spammed heavily if it would be free !!

  2. If you want to send sms from your website within your .net code, then you can try clickatell.com, because anyway on webserver you cant really connect a cellphone unless you can get a chance to get into datacenter and setup your own hardware.

If you want to send a lot of SMS messages then a gateway and a bundle deal is by far the cheapest way to go - you generally just send an email to the gateway with the users number in the subject line. If you want something more flexible (but not as cheap) then try Email to SMS

I'm currently use "mCore .Net Library 1.2" for this purposes. It's simple enough, but unfortunately not completely bug-free.

iSMS Malaysia

Our team member has just posted a tutorial on how to send sms using c#.

// Create a new 'Uri' object with the specified string.
Uri myUri = new Uri("http://isms.com.my/isms_send.php?un=" + username.Text + "&pwd=" + mypassword.Text + "&dstno=" + phonebox.Text + "&msg=" + msgbox.Text + "&type=1&sendid=60198899001");

// Create a new request to the above mentioned URL.
WebRequest myWebRequest = WebRequest.Create(myUri);

// Assign the response object of 'WebRequest' to a 'WebResponse' variable.
WebResponse myWebResponse = myWebRequest.GetResponse();
StreamReader reader = new StreamReader(myWebResponse.GetResponseStream());

string s_ResponseString = reader.ReadToEnd();

So if you are interested, just head over to http://www.isms.com.my/how-to-send-sms-c-sharp.php and you can also download the demo file for testing purposes. :)

Click HERE to download iSMS Demo Project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!