如何从asp.net网站发送短信 [英] how to send sms from asp.net website
本文介绍了如何从asp.net网站发送短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
快速了解整个SMS应用程序及其工作原理< a href ="http://www.codeproject.com/KB/IP/Sending_SMS_using_Net.aspx">单击此处.</a> [< a href ="http://www.codeproject.com/KB/IP /Sending_SMS_using_Net.aspx"target =" _ blank"title ="新窗口> ^</a>]
嗨
1.首先,您需要一个可以发送短信的短信服务器.
2.使用System.Net.Mail
3.创建MailMessage类的对象
MailMessage email =新的MailMessage("xyz@org.com",已收据);
将所需信息添加到对象
email.subject =手机号码"//这应该是手机号码.
email.TO ="xyz@org.com";
email.From ="pqr@org.com"
4. creata SMTPClient对象
5.使用上面的SMTPClient对象发送消息.
SMTPClient objClient =新的SMTPClient();
objClient.send(email);
6.这样您的服务器会将SMS发送到主题中添加的号码.
希望这会有所帮助. :)
hiiiiiiiii i am developing web site which send free sms to client.. and for that i need to send sms from asp.net web application. i am using asp.net framework 3.5. i am already check many web help but that are now working plz.. help me
解决方案
To get quick overview for entire SMS application and how it works <a href="http://www.codeproject.com/KB/IP/Sending_SMS_using_Net.aspx">Click here.</a>[<a href="http://www.codeproject.com/KB/IP/Sending_SMS_using_Net.aspx" target="_blank" title="New Window">^</a>]
Hi
1. First you need a sms server which will send the SMS.
2. using System.Net.Mail
3. create object of MailMessage class
MailMessage email= new MailMessage("xyz@org.com", receipes);
add the required information to the object
email.subject= "mobile number"// this should be the mobile number.
email.TO ="xyz@org.com";
email.From="pqr@org.com"
4. creata SMTPClient object
5. using the above SMTPClient object send the message.
SMTPClient objClient= new SMTPClient();
objClient.send(email);
6. so your server will send the SMS to the Numbers which are added in the Subject.
Hope this will help. :)
这篇关于如何从asp.net网站发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文