Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Nov 2010
    Posts
    74
    Points
    138
         User Info     Contact     Gamer ID
    Join Date
    Nov 2010
    Posts
    74
    Points
    138

    Default [VB.NET] Send a text message to a Cell phone

    Well oddly enough when you text a cell phone it's like emailing someone, in a sense that it actually uses an email address.

    This is some sample code from my SMS spammer I made a long time back:

    To get this started you need to do some imports at the top of your form or class:

    Code:
    Imports System.Net.Mail
    Imports System.Net
    Imports System.Diagnostics
    Then the code for sending the email:
    Code:
     Dim smtp As SmtpClient = Nothing
            Dim sms_message As New MailMessage()
     sms_message.From = New MailAddress(My.Settings.email)
                    sms_message.To.Add(txt_number.Text & provider)
                    sms_message.Subject = txt_subject.Text
                    sms_message.Body = txt_message.Text
                    smtp = New SmtpClient("smtp.gmail.com")
                    smtp.Port = 587
                    smtp.EnableSsl = True
                    ' Edit email address  and password accorindingly. You don't need to have @gmail.com
                    smtp.Credentials = DirectCast(New NetworkCredential(My.Settings.user_name, My.Settings.password), ICredentialsByHost)
                    smtp.Send(sms_message)
                    ProgressBar1.PerformStep()
    Now this was a chunk of code taken from the actual program and sitting as it wont work correctly.

    Somethings that need to be changed:
    Code:
     smtp.Credentials = DirectCast(New NetworkCredential(My.Settings.user_name, My.Settings.password), ICredentialsByHost)
    My.settings.user_name and My.settings.password , My.setttings.email

    You can just Dim 3 variables as string and sub those in.

    Code:
     sms_message.To.Add(txt_number.Text & provider)
    Provider is the cell phone carrier and txt_number is well their cell number.

    I'll be nice and also include the sms addresses.

    You can ignore the case statements and just pull the address's from it

    Code:
            If country = "USA" Then
                Select Case cmb_phone_services.SelectedIndex
                    Case 0
                        provider = "@vtext.com"
                    Case 1
                        provider = "@txt.att.net"
                    Case 2
                        provider = "@message.alltel.com"
                    Case 3
                        provider = "@page.nextel.com"
                    Case 4
                        provider = "@myboostmobile.com"
                    Case 5
                        provider = "@tmomail.net"
                    Case 6
                        provider = "@vmobl.com"
                    Case 7
                        provider = "@messaging.sprintpcs.com "
                    Case 8
                        provider = "@msg.acsalaska.com"
                    Case 9
                        provider = "@gocbw.com"
                    Case 10
                        provider = "@rinasms.com"
                    Case 11
                        provider = "@email.uscc.net"
                    Case 12
                        provider = "@viaerosms.com"
                    Case 13
    
                End Select
            ElseIf country = "Canada" Then
                Select Case cmb_phone_services.SelectedIndex
                    Case 0
                        provider = "@txt.bell.ca"
                    Case 1
                        provider = "@msg.telus.com"
    
                    Case 2
                        provider = "@vmobl.com"
    
                    Case 3
                        provider = "@sms.sasktel.com"
    
                    Case 4
                        provider = "@msg.koodomobile.com"
    
                    Case 5
                        provider = "@fido.ca"
    
                    Case 6
                        provider = "@pcs.rogers.com "
                End Select
    
            ElseIf country = "UK" Then
                Select Case cmb_phone_services.SelectedIndex
                    Case 0
                        provider = "@sms.t-mobile.at"
                    Case 1
                        provider = "@orange.pl"
                    Case 2
                        provider = "@sms.mymeteor.ie"
                    Case 3
                        provider = "@text.plusgsm.pl"
                    Case 4
                        provider = "@t-mobile.uk.net"
                    Case 5
                        provider = "@tachyonsms.co.uk"
                    Case 6
                        provider = "@sms.ycc.ru"
                End Select
            End If

    0 Not allowed! Not allowed!

  2. #2
    Mad Fly
    Webmaster

    Join Date
    Apr 2010
    Posts
    410
    Points
    1,338
         User Info     Contact     Gamer ID
    Join Date
    Apr 2010
    Posts
    410
    Points
    1,338

    Default

    I have found plenty of programs for texting a phone. But thanks for the share.

    0 Not allowed! Not allowed!

  3. #3
    I'ma Fuckin Scalie

    Feckless.'s Avatar
    Join Date
    Dec 2008
    Location
    F̷̧̨̙̞̱̥̓̄̂ͯ̃ͬ̚̚͟U&#
    Posts
    3,046
    Points
    8,676
         User Info     Contact     Gamer ID
    Join Date
    Dec 2008
    Location
    F̷̧̨̙̞̱̥̓̄̂ͯ̃ͬ̚̚͟U&#
    Posts
    3,046
    Points
    8,676
    Gamer IDs

    Gamertag: XEFDragon Steam ID: SketchyDragon

    Default

    Ooh... tasty.

    This could come in handy for a jackass in mah life x]

    0 Not allowed! Not allowed!
    Code:
           .      
                            .           .  .Feckless.
                                  . |     .       .
                              ,'\   |\   .     .
           ________          / /.:  ;;       .
        ___        /\       / :'|| //     .        *^__________________________
     ___          /||\     (| | ||;'   .          ;      /\ ; ______________________
    _            / || \   // ||,;'-.._           .      //\\  . .       ________________
                /  ||  \ /: ,;,`';:.--`         /      //  \\   .:              ___________
               /   ||   \/|:|'`-(\\            /      //    \\     : ;                 ______
              /    ||    /::: \-'\`'          /      //      \\        ;:                ______
             /     ||     /\\\ \,-\.         /      //        \\         ;:                ________
            /      ||      /`'\\.,-:.-.     /__    //          \\          ;:                    _______
           /       ||       \ | \.,-' `-.  / ,.   //            \\            ;:                        ________
          /        ||        \ \ .  \ _.-' \',   //              \\              ;:                        ______
         /         ||         \ `-)  `.   _.:'  //                \\               ;:           ^^^^^_______
        /          ||          \`/    |-''  |' //                  \\               \ ^^^^^^^^^^^   
       /           ||           : \ \ |__..-;'  ^^^^^^^^^^          \\         ^^^^^^^
      /        /\  ||  ^^^      | | | ;    / '            ^^^^^^^^   \\  ^^^^^^^
     /        /  \ || /   ^^   ; / //--../_ '                    ^^^^^\/
    /        /    \||/      ^^ / / /:._  /-.''
            /      \/         / / / |_ ,(   
           /                  \ \ \ :,'  \
          /                   / /////    /
         /                     `````   :
        _                          \  \  |
       /                      \    \  \ |..-_         
      _                        )   / `/___-.-`      ,. 
                             ,'  -.\.  `. `'        ,,
                             \'\\\\ \`._ `-..___..-+,
                                ````    ``-..___..-'

    Quote Originally Posted by OSaMaBiNLoGiN View Post
    HOLY SHIT KILL YOURSELF
    Quote Originally Posted by Fuck Sky View Post
    Are you fucking retarded

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 11:57 AM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.