mbacs
asked on
send email from vb.net useing gmail
Im trying to send a email using my gmail any idea why this is not working?
this is the code
Sub SendEmail()
Dim insMail As New MailMessage()
insMail.Sender = New MailAddress("myemail@gmail .com")
insMail.From = New MailAddress("myemail@gmail .com")
insMail.To.Add(New MailAddress("myemail@yahoo .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("mye mail@gmail .com", "mypassword", "smtp.gmail.com")
Smtp.Send(insMail)
End Sub
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
any help?
Thanks
this is the code
Sub SendEmail()
Dim insMail As New MailMessage()
insMail.Sender = New MailAddress("myemail@gmail
insMail.From = New MailAddress("myemail@gmail
insMail.To.Add(New MailAddress("myemail@yahoo
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("mye
Smtp.Send(insMail)
End Sub
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
any help?
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.