im trying to send email from vb.net get error msg .... "The SMTP" server require scour connection or the client was not authenticated"
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New Net.NetworkCredential("[email protected]", "*******")
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.gmail.com"
e_mail = New MailMessage()
e_mail.From = New MailAddress("[email protected]", "Ejaz Sarwar")
e_mail.To.Add("[email protected]")
e_mail.Subject = "Email Sending"
e_mail.IsBodyHtml = False
e_mail.Body = txtSunCovered.Text
Smtp_Server.Send(e_mail)
MsgBox("Mail Sent")