Im trying to send a email using my gmail any idea why this is not working?
this is the code
Dim insMail As New MailMessage()
insMail.Sender = New MailAddress("firstname.lastname@example.org")
insMail.From = New MailAddress("email@example.com")
insMail.Subject = "Testing message"
insMail.Body = "i hope it delivered"
Dim Smtp As New SmtpClient
Smtp.Host = "Smtp.gmail.com"
Smtp.Port = 587
Smtp.EnableSsl = True
Smtp.Credentials = New Net.NetworkCredential("firstname.lastname@example.org", "mypassword", "smtp.gmail.com")
and this is the error
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required d24sm7131381and