Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Net.Mail
- Public Class Form1
- Dim count As Integer
- Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
- If ComboBox1.Text = "Custom" Then
- Dim input As String = InputBox("Please enter a custom smtp server")
- Label9.Text = input
- End If
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Timer1.Enabled = True
- End Sub
- Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
- If TextBox7.Text = count Then
- Timer1.Enabled = False
- MsgBox("Spam Complete! Messages Sent - " & count, MsgBoxStyle.Exclamation, "COMPLETE")
- count = 0
- Exit Sub
- End If
- If ComboBox1.Text = "Gmail" Then
- Try
- Dim mail As New MailMessage
- mail.Subject = TextBox5.Text
- mail.Body = TextBox4.Text
- mail.To.Add(TextBox6.Text)
- mail.From = New MailAddress(TextBox1.Text)
- Dim SMTP As New SmtpClient("smtp.gmail.com")
- SMTP.EnableSsl = True
- SMTP.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox3.Text)
- SMTP.Port = "587"
- SMTP.Send(mail)
- 'MsgBox("Sent Message To : " & TextBox6.Text, MsgBoxStyle.Information, "Sent!")
- Catch ex As Exception
- MsgBox("Failed To Send Message", MsgBoxStyle.Exclamation, "ERROR")
- Exit Sub
- End Try
- Label10.Text = count + 1
- count = count + 1
- End If
- If ComboBox1.Text = "Yahoo" Then
- Try
- Dim mail As New MailMessage
- mail.Subject = TextBox5.Text
- mail.Body = TextBox4.Text
- mail.To.Add(TextBox6.Text)
- mail.From = New MailAddress(TextBox1.Text)
- Dim SMTP As New SmtpClient("smtp.mail.yahoo.com")
- SMTP.EnableSsl = True
- SMTP.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox3.Text)
- SMTP.Port = "587"
- SMTP.Send(mail)
- 'MsgBox("Sent Message To : " & TextBox6.Text, MsgBoxStyle.Information, "Sent!")
- Catch ex As Exception
- MsgBox("Failed To Send Message", MsgBoxStyle.Exclamation, "ERROR")
- Exit Sub
- End Try
- Label10.Text = count + 1
- count = count + 1
- End If
- If ComboBox1.Text = "hotmail" Then
- Try
- Dim mail As New MailMessage
- mail.Subject = TextBox5.Text
- mail.Body = TextBox4.Text
- mail.To.Add(TextBox6.Text)
- mail.From = New MailAddress(TextBox1.Text)
- Dim SMTP As New SmtpClient("smtp.live.com")
- SMTP.EnableSsl = True
- SMTP.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox3.Text)
- SMTP.Port = "587"
- SMTP.Send(mail)
- 'MsgBox("Sent Message To : " & TextBox6.Text, MsgBoxStyle.Information, "Sent!")
- Catch ex As Exception
- MsgBox("Failed To Send Message", MsgBoxStyle.Exclamation, "ERROR")
- Exit Sub
- End Try
- Label10.Text = count + 1
- count = count + 1
- End If
- If ComboBox1.Text = "Custom" Then
- Try
- Dim mail As New MailMessage
- mail.Subject = TextBox5.Text
- mail.Body = TextBox4.Text
- mail.To.Add(TextBox6.Text)
- mail.From = New MailAddress(TextBox1.Text)
- Dim SMTP As New SmtpClient(Label9.Text)
- SMTP.EnableSsl = True
- SMTP.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox3.Text)
- SMTP.Port = "587"
- SMTP.Send(mail)
- 'MsgBox("Sent Message To : " & TextBox6.Text, MsgBoxStyle.Information, "Sent!")
- Catch ex As Exception
- MsgBox("Failed To Send Message", MsgBoxStyle.Exclamation, "ERROR")
- Exit Sub
- End Try
- Label10.Text = count + 1
- count = count + 1
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement