-4

i want to send an email with my gmail account but i have this error and the email doas'nt sent ! http://up.dev-point.com/uploads1/a75d55e308e91.png My code is :

Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click


    Dim SmtpServer As New SmtpClient("smtp.gmail.com", 587)
    SmtpServer.Credentials = New Net.NetworkCredential("ihab@gmail.com", "pass")
    Dim mail As New MailMessage("ihab@gmail.com", "ihab@gmail.com", "New", "txt")
    SmtpServer.Send(mail)


End Sub 
I.R
  • 51
  • 1
  • 1
  • 5
  • 1
    1.) Don't include a link to a picture of the error; include the error text *directly in the question itself* 2.) error text in foreign languages are useless to us; translate it into English. – rory.ap Jul 08 '16 at 13:47
  • 3
    Don't call anyone bro, ever. – rory.ap Jul 08 '16 at 13:50

1 Answers1

0

Please see this case, I think you need to make sure SSL is enabled and possibly modify account settings for smtp access. Sending email through Gmail SMTP server with C#

If you need assistance converting the C# code to vb.net let me know

Community
  • 1
  • 1