•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,583 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,610 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 71722 | Replies: 30
![]() |
The other way, is by using a GSM modem. Brands are WaveCom Fastrack, Multitech and SonyEricson. The latest, called GM28 and distributed by www.toppcompanies.com is the one I found most reliable (I´ve tested the others).
If you go for a modem, you will have to use MSCOMM to communicate with the modem via Serial Port. The connection parameters will vary with each model. Then you will have to transmit AT commands to the modems to have them send and receive SMS.
To help you decide which method to use, read the next reply...
If you go for a modem, you will have to use MSCOMM to communicate with the modem via Serial Port. The connection parameters will vary with each model. Then you will have to transmit AT commands to the modems to have them send and receive SMS.
To help you decide which method to use, read the next reply...
The SMPP option gives you these advantages and disadvantages:
- Massive amounts of SMS. Perfect for SMS spammers.
- Lower costs, depending whether your provider charges you for SMPP and how much.
- Providers rarely release access to SMPP to individuals. Sometimes not even companies.
The GSM Modem option gives you these other advantages:
- Freedom from the provider. Just insert the SIM and you are ready.
- It will handle (outgoing or incoming) only 1 message every 4.5 seconds.
Sample code... sorry is too much. But will gladly gide you to the pieces of the puzzle.
- Massive amounts of SMS. Perfect for SMS spammers.
- Lower costs, depending whether your provider charges you for SMPP and how much.
- Providers rarely release access to SMPP to individuals. Sometimes not even companies.
The GSM Modem option gives you these other advantages:
- Freedom from the provider. Just insert the SIM and you are ready.
- It will handle (outgoing or incoming) only 1 message every 4.5 seconds.
Sample code... sorry is too much. But will gladly gide you to the pieces of the puzzle.
Oh.. and before I forget, there is also the posibility of ONLY Sending messages, by using PHP via HTTP. I know there is a way create your own internet explorer with vb, which I have not done yet. Therefore, all you need is to send the appropiate code to the URL provided by the carrier. For this, you will need to find out if your carrier allows SMS via HTTP, and if they will give you access to it. I have the PHP protocol needed for this somewhere. I´ll post it here later.
•
•
Join Date: Jul 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
hye guys
Thers an easy way to send sms from ur .NET application
all u need is a web service that provides this,
well most of them are not for free, although u can use trial licences that let u send around 5 - 10 sms's for free
u can try out Stike Iron ( 10 sms free for trial licence)
http://ws.strikeiron.com/SMSTextMessaging?WSDL
just add the web reference to this wsdl from ur VS and thats as easy as it gets
Happy sms 'ing
PS: i have a sample application if anyone wants mail me:dharshan.ks@gmail.com
Cheers
Thers an easy way to send sms from ur .NET application
all u need is a web service that provides this,
well most of them are not for free, although u can use trial licences that let u send around 5 - 10 sms's for free
u can try out Stike Iron ( 10 sms free for trial licence)
http://ws.strikeiron.com/SMSTextMessaging?WSDL
just add the web reference to this wsdl from ur VS and thats as easy as it gets
Happy sms 'ing
PS: i have a sample application if anyone wants mail me:dharshan.ks@gmail.com
Cheers
•
•
Join Date: Dec 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Below is simple code:
Imports System.Web.Mail
.
.
.
Dim toPhoneNumber As String = "DestinationPhoneNumber";
Dim login As String = "YouredomainUsername"
Dim password As String = "YourPassword"
Dim compression As String = "Compression Option goes here "
Dim body As String = "Your Message"
Dim mail As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
mail.To = toPhoneNumber + "@sms.domainname.com"
mail.From = login + "@domain.com"
mail.Subject = compression
mail.Body = body
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", login)
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password)
System.Web.Mail.SmtpMail.SmtpServer = "domain.com";
System.Web.Mail.SmtpMail.Send(mail)
or u can find out on this link below:
http://www.ipipi.com/help/send_text_...ing_vb_net.htm
Imports System.Web.Mail
.
.
.
Dim toPhoneNumber As String = "DestinationPhoneNumber";
Dim login As String = "YouredomainUsername"
Dim password As String = "YourPassword"
Dim compression As String = "Compression Option goes here "
Dim body As String = "Your Message"
Dim mail As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
mail.To = toPhoneNumber + "@sms.domainname.com"
mail.From = login + "@domain.com"
mail.Subject = compression
mail.Body = body
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", login)
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password)
System.Web.Mail.SmtpMail.SmtpServer = "domain.com";
System.Web.Mail.SmtpMail.Send(mail)
or u can find out on this link below:
http://www.ipipi.com/help/send_text_...ing_vb_net.htm
•
•
Join Date: Feb 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
You can go to
http://www.emant.com/681002.page
where there is the free sms component emantsms and an example program.
http://www.emant.com/681002.page
where there is the free sms component emantsms and an example program.
•
•
Join Date: Jan 2006
Location: Its the internet... i am everywhere lol
Posts: 274
Reputation:
Rep Power: 3
Solved Threads: 11
There is one way to send for free without using an sms gateway but you have to know the carrier the person is on. You can then send an email. Most are in the form of mobilenumber@carrierssmsemail.tld For example verizon is mobilenumber@vtext.com and most major carriers have similar.
HI,
Here is code for a dll file for VB.NET 2005 that I am currently using to send SMS Messages. Receiving SMS Messages are not done yet, but I will post it when it is done. This Code will work with FARGO Maestro 100 GSM Modem (WAVECOM)
Please note that this code use threading ...
Usage Of The Above Code Should be straight Forward, But Here Goes
In a Windows Form App
I Hope this helps
Here is code for a dll file for VB.NET 2005 that I am currently using to send SMS Messages. Receiving SMS Messages are not done yet, but I will post it when it is done. This Code will work with FARGO Maestro 100 GSM Modem (WAVECOM)
Please note that this code use threading ...
Option Explicit On Imports System Imports System.Threading Imports System.ComponentModel Imports System.Windows.Forms Imports System.IO.Ports PublicClass SMSCOMMS Private WithEvents SMSPort As SerialPort Private SMSThread As Thread Private ReadThread As Thread Shared _Continue As Boolean = False Shared _ContSMS As Boolean = False Private _Wait As Boolean = False Shared _ReadPort As Boolean = False Private WithEvents DBServer As Postgres Public Event Sending(ByVal Done As Boolean) Public Event DataReceived(ByVal Message As String) Public Sub New(ByRef COMMPORT As String) SMSPort = New SerialPort With SMSPort .PortName = COMMPORT .BaudRate = 9600 .Parity = Parity.None .DataBits = 8 .StopBits = StopBits.One .Handshake = Handshake.RequestToSend .DtrEnable = True .RtsEnable = True .NewLine = vbCrLf End With DBServer = New Postgres() ReadThread = New Thread(AddressOf ReadPort) End Sub Public Function SendSMS(ByVal CellNumber As String, ByVal SMSMessage As String) As Boolean Dim MyMessage As String = Nothing ' 'Check if Message Length <= 160 If SMSMessage.Length <= 160 Then MyMessage = SMSMessage Else MyMessage = Mid(SMSMessage, 1, 160) End If 'MsgBox("Sending " & MyMessage & " to " & CellNumber) If IsOpen = True Then SMSPort.WriteLine("AT+CMGS=" & CellNumber & vbCr) _ContSMS = False While _ContSMS = False Application.DoEvents() End While SMSPort.WriteLine(MyMessage & vbCrLf & Chr(26)) _Continue = False RaiseEvent Sending(False) End If End Function Private Sub ReadPort() Dim SerialIn As String = Nothing Dim RXBuffer(SMSPort.ReadBufferSize) As Byte Dim SMSMessage As String = Nothing Dim Strpos As Integer = 0 Dim TmpStr As String = Nothing While SMSPort.IsOpen = True If (SMSPort.BytesToRead <> 0) And (SMSPort.IsOpen = True) Then While SMSPort.BytesToRead <> 0 SMSPort.Read(RXBuffer, 0, SMSPort.ReadBufferSize) 'SMSPort.BytesToRead SerialIn = SerialIn & System.Text.Encoding.ASCII.GetString(RXBuffer) ' Handle Internal Events ' For Received Characters If SerialIn.Contains(">") = True Then _ContSMS = True End If If SerialIn.Contains("+CMGS:") = True Then _Continue = True RaiseEvent Sending(True) _Wait = False SerialIn = String.Empty ReDim RXBuffer(SMSPort.ReadBufferSize) End If End While RaiseEvent DataReceived(SerialIn) SerialIn = String.Empty ReDim RXBuffer(SMSPort.ReadBufferSize) End If End While End Sub Public ReadOnly Property IsOpen() As Boolean Get If SMSPort.IsOpen = True Then IsOpen = True Else IsOpen = False End If End Get End Property Public Sub Open() If IsOpen = False Then SMSPort.Open() ReadThread.Start() End If End Sub Public Sub Close() If IsOpen = True Then SMSPort.Close() End If End Sub EndClass
Usage Of The Above Code Should be straight Forward, But Here Goes
In a Windows Form App
Option Explicit On 'Other Imports Imports SMSCOMMS ' Rest of stuff 'Declarations Public WitheEvents SMSEngine as SMSCOMMS Public Sub Main() SMSEngine = New SMSCOMMS("COM1") SMSEngine.Open() SMSEngine.SendSMS("000000000","THIS IS YOUR MESSAGE") End Sub Public Sub Form_Close() SMSEngine.Close() End Sub
I Hope this helps
•
•
Join Date: Oct 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I found a link to a page showing how to send text messages in .NET. Its in C# instead of VB.NET, but it should still help. Plus, the web service being used, webservicex, is a free unlimited service, so that should definitely be worth taking a look at if you need a free SMS web service.
Here's the link:
http://www.codeproject.com/cs/webser...sThroughWS.asp
Hope this helps!
Jeff
Here's the link:
http://www.codeproject.com/cs/webser...sThroughWS.asp
Hope this helps!
Jeff
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
- sending sms (ASP.NET)
- Sending sms via asp..net (VB.NET)
- Need Suggestion regarding sending sms through asp.net app (ASP.NET)
Other Threads in the VB.NET Forum
- Previous Thread: Error:Occured
- Next Thread: Generate code Program Help


Linear Mode