Dear Experts,
I want to develop a application that send sms on any mobile. if any one done this project then kindly give some important consideration for developing this application.

Best Regards,


4 Years
Discussion Span
Last Post by vbDotMe

I've been thinking about something like this myself, and I've been doing some research into the matter.
There are two options available to you (that I'm aware of).

1) Create an application that communicates with a cellphone connected to your computer.
2) Use an existing webservice API provided by any available SMS-Gateway provider. (Will most likely be a monthly fee or per sent message).


I'm no expert but this is what I use, coded for myself. All you need to do is enter the number to text and the carrier, your email and mail server and test it out. You can always add textboxes for the phone number and such, but like I said I coded this for myself. The only thing is you can only send texts, you can't recieve them.

Well here you go:

    Imports System
    Imports System.Net.Mail

    Public Class frmMain

    #Region "Declarations"
    ' message elements
    Private mMailServer As String
    Private mTo As String
    Private mFrom As String
    Private mMsg As String
    Private mSubject As String
    #End Region

    #Region "Methods"
    Private Sub btnSend_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles btnSend.Click

        ' Collect user input from the form and stow content into
        ' the objects member variables

        mTo = Trim("1234567890") & Trim("@txt.att.net") '' NUMBER TO TXT HERE
        mFrom = Trim("YOUR@EMAIL.COM")                  '' YOUR EMAIL TO SEND FROM
        mSubject = Trim(txtSubject.Text)                '' SUBJECT TEXTBOX
        mMailServer = Trim("smtp.google.com")           '' YOUR MAIL SERVER
        mMsg = Trim(txtMessage.Text)                    '' MESSAGE TEXTBOX

        ' Within a try catch, format and send the message to
        ' the recipient. Catch and handle any errors.

            Dim message As New MailMessage(mFrom, mTo, mSubject, mMsg)
            Dim mySmtpClient As New SmtpClient(mMailServer)
            mySmtpClient.UseDefaultCredentials = True

            MessageBox.Show("Your message has been sent to " & _
                            message.To.ToString() & ".", "Mail", _
                            MessageBoxButtons.OK, _

        Catch ex As FormatException

            MessageBox.Show(ex.StackTrace, ex.Message, _
                            MessageBoxButtons.OK, _

        Catch ex As SmtpException

            MessageBox.Show(ex.StackTrace, ex.Message, _
                            MessageBoxButtons.OK, _

        Catch ex As Exception

            MessageBox.Show(ex.StackTrace, ex.Message, _
                            MessageBoxButtons.OK, _
        End Try
    End Sub

    Private Sub btnExit_Click(ByVal sender As System.Object, _
            ByVal e As System.EventArgs) Handles btnExit.Click

        ' Upon user’s request, close the application

    End Sub
    #End Region

    End Class

Edited by pyTony: fencing ~~~ vb code tags added


No, this code works as if you're sending an email to a cell phone. Be careful though, many cell carriers have different domains for SMS and MMS.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.