Often times it may be a requirement for your web application to send an SMS message. Such examples would be reminders, password resetting, and spam.
Q: Can I have some code to send an SMS message?
A: Unfortunately it isn't as simple as just copying and pasting some code into your application and you can start blasting out text messages. SMS is a service, and cellular carriers will charge for it. The cost varies by carrier. SMS is a standard defined
set of protocols that is authenticated to. When you contact a cellular company they will provide you with a username, password, gateway (sometimes called an Endpoint), and various other protocol related configurations.
There are several existing .NET SMS SDKs out there - some are free and open source - but that doesn't change the fact that ultimately, those SDKs need endpoints configuration and you are back to the problem of needing a provider.
Q: OK - How do I get in touch with a company to send an SMS?
A: Most often than not it isn't feasible to contact a cellular company themselves. If you were to contact say, Verizon, you would only be able to send an SMS to Verizon phones. So you would have to partner with individual carriers - then there is the pain
of figuring out which number belongs to which carrier. The easiest solution is to go to a 3rd party company that handles all of the messy work for you. This gives you an advantage of sending them in a simple manner and also not needing to know or understand
how the SMPP protocol (or whatever protocol they are using - there are many) works as they will almost always provide an SDK or Web Service of their own.
Q: What 3rd party Gateway Provider should I use?
A: It varies by country, but a popular one that is somewhat regional is
Clickatell. (Disclaimer - I do not work for them nor have I used their services - I found them via Google). They also provide their own SDK with sample code.
Q: I want a vanity or custom shortcode, like 134569 instead of a phone number.
A: That depends on the gateway provider. Clickatell allows you to rent one.
Q: We are going to be using A LOT of SMS messages - what if I want my own gateway?
A: If you want to setup your own gateway, then you will need some physical hardware are well as software.
Kannel is a popular open source SMS Gateway that runs on Unix like operating systems. You will still need to contact an SMS Center and this does not mean you can start sending out SMS messages for free.
If I understand you correctly you want to send a SMS message to a phone. Provided that you know the carrier for that phone you can send it a message via email.
So if the phone number was 999-999-9999 and the carrier was Verizon then you could simply email to 9999999999@vtext.com and the message will appear on the phone as a text message. So as long as you know the carrier of the phone number it will work. If
you don't know the carrier then I suppose you could send it to all the carriers and at least one should work.
My post was a FAQ (Frequently asked Question) with a Q and A (Since it's in the FAQ Forum). I wasn't really looking for an answer, just writing a post that can help others.
Buddy..I m new in asp.net and i need ur help regarding Sending SMS through Asp.net . I personally tried to work on Sms via Asp.net but could'nt get Success.. Will u please Paste ur code that u r using to Send SMS.. It would be Ur kind Aid to Me.. thanks
Actually, i'm having this problem of sending an automated sms from my asp.net (vb) website. I'm a student and presently designing a website for my final project. The project is an intelligent car rental system that include sending an sms notification to
rentals to remind them of when to return the car.
I've been in contact with clickatell for gateway but my problem is how to schedule the sms notification. Details of rental service will be stored in SQL database which includes the renter name, address, phone, rentdate and returningdate. So if returningdate
is tomorrow, then sms notification should be sent today as a reminder.
vcsjones
All-Star
34842 Points
4424 Posts
Moderator
MVP
Sending an SMS Message with ASP.NET
Aug 15, 2009 11:38 PM|LINK
Often times it may be a requirement for your web application to send an SMS message. Such examples would be reminders, password resetting, and spam.
Q: Can I have some code to send an SMS message?
A: Unfortunately it isn't as simple as just copying and pasting some code into your application and you can start blasting out text messages. SMS is a service, and cellular carriers will charge for it. The cost varies by carrier. SMS is a standard defined set of protocols that is authenticated to. When you contact a cellular company they will provide you with a username, password, gateway (sometimes called an Endpoint), and various other protocol related configurations.
There are several existing .NET SMS SDKs out there - some are free and open source - but that doesn't change the fact that ultimately, those SDKs need endpoints configuration and you are back to the problem of needing a provider.
Q: OK - How do I get in touch with a company to send an SMS?
A: Most often than not it isn't feasible to contact a cellular company themselves. If you were to contact say, Verizon, you would only be able to send an SMS to Verizon phones. So you would have to partner with individual carriers - then there is the pain of figuring out which number belongs to which carrier. The easiest solution is to go to a 3rd party company that handles all of the messy work for you. This gives you an advantage of sending them in a simple manner and also not needing to know or understand how the SMPP protocol (or whatever protocol they are using - there are many) works as they will almost always provide an SDK or Web Service of their own.
Q: What 3rd party Gateway Provider should I use?
A: It varies by country, but a popular one that is somewhat regional is Clickatell. (Disclaimer - I do not work for them nor have I used their services - I found them via Google). They also provide their own SDK with sample code.
Here is a list of other ones: http://www.developershome.com/sms/smsGatewayProvComp.asp
Q: I want a vanity or custom shortcode, like 134569 instead of a phone number.
A: That depends on the gateway provider. Clickatell allows you to rent one.
Q: We are going to be using A LOT of SMS messages - what if I want my own gateway?
A: If you want to setup your own gateway, then you will need some physical hardware are well as software. Kannel is a popular open source SMS Gateway that runs on Unix like operating systems. You will still need to contact an SMS Center and this does not mean you can start sending out SMS messages for free.
Good luck with your application.
SMS
tdinpsp
Member
114 Points
125 Posts
Re: Sending an SMS Message with ASP.NET
Aug 16, 2009 05:12 PM|LINK
If I understand you correctly you want to send a SMS message to a phone. Provided that you know the carrier for that phone you can send it a message via email.
<asp:DropDownList ID="DDLCarrier" runat="server"> <asp:ListItem Value="@text.att.net">AT&T</asp:ListItem> <asp:ListItem Value="@cingularme.com">Cingular</asp:ListItem> <asp:ListItem Value="@messaging.nextel.com">Nextel</asp:ListItem> <asp:ListItem Value="@messaging.sprintpcs.com">Sprint</asp:ListItem> <asp:ListItem Value="@tmomail.net">T-Mobile</asp:ListItem> <asp:ListItem Value="@vtext.com">Verizon</asp:ListItem> <asp:ListItem Value="@vmobl.com">Virgin Mobile</asp:ListItem> </asp:DropDownList>So if the phone number was 999-999-9999 and the carrier was Verizon then you could simply email to 9999999999@vtext.com and the message will appear on the phone as a text message. So as long as you know the carrier of the phone number it will work. If you don't know the carrier then I suppose you could send it to all the carriers and at least one should work.
vcsjones
All-Star
34842 Points
4424 Posts
Moderator
MVP
Re: Sending an SMS Message with ASP.NET
Aug 16, 2009 06:53 PM|LINK
My post was a FAQ (Frequently asked Question) with a Q and A (Since it's in the FAQ Forum). I wasn't really looking for an answer, just writing a post that can help others.
raghava.mrk
Member
53 Points
15 Posts
Re: Sending an SMS Message with ASP.NET
Sep 18, 2009 03:59 AM|LINK
Thanks for posting this article.... It helps a lot for sending messages through asp.net pages
salman_progr...
Member
24 Points
36 Posts
Re: Sending an SMS Message with ASP.NET
Sep 18, 2009 04:25 AM|LINK
hey.... Raghakrishna Raju.M
Buddy..I m new in asp.net and i need ur help regarding Sending SMS through Asp.net . I personally tried to work on Sms via Asp.net but could'nt get Success.. Will u please Paste ur code that u r using to Send SMS.. It would be Ur kind Aid to Me.. thanks
Pushkar
Contributor
5747 Points
1111 Posts
Re: Sending an SMS Message with ASP.NET
Sep 23, 2009 04:57 AM|LINK
Hello Sir Jones
Thank you very much for the nice information.
I didn't know how to send SMS in ASP.Net.
But after read your post, i got the idea.
Its really helpful
====================================
Pushkar
Srinivas>bhe...
Member
24 Points
8 Posts
Re: Sending an SMS Message with ASP.NET
Sep 23, 2009 06:59 AM|LINK
Good Info jones
Srinivas Bheemareddy
deboojk123
Member
4 Points
2 Posts
Re: Sending an SMS Message with ASP.NET
Sep 26, 2009 07:53 AM|LINK
hello,
Actually, i'm having this problem of sending an automated sms from my asp.net (vb) website. I'm a student and presently designing a website for my final project. The project is an intelligent car rental system that include sending an sms notification to rentals to remind them of when to return the car.
I've been in contact with clickatell for gateway but my problem is how to schedule the sms notification. Details of rental service will be stored in SQL database which includes the renter name, address, phone, rentdate and returningdate. So if returningdate is tomorrow, then sms notification should be sent today as a reminder.
Please advise
realisticp
Member
2 Points
1 Post
Re: Sending an SMS Message with ASP.NET
Oct 14, 2009 09:07 AM|LINK
Hi,
As I am one of the fresher asp.net developer ,get some usuful tips from here.
Ramesh Bandi
Member
20 Points
10 Posts
Re: Sending an SMS Message with ASP.NET
Oct 16, 2009 11:23 AM|LINK
Hi Jones,
I think I wasted so much of time on this topic but after having a look at your post I got complete idea of sending SMS through ASP.NET form.
Thanks for the post.