title: unable to send email from VB.net
body: <p>This is my code to send email using GMAIL and VB.NET:</p>
  
  <pre><code>        Try
              Dim SmtpServer As New SmtpClient()
              SmtpServer.Credentials = New Net.NetworkCredential("mygmailid@gmail.com", "mypassword")
              SmtpServer.Port = 587
              SmtpServer.Host = "smtp.gmail.com"
              SmtpServer.EnableSsl = True
  
              mail = New MailMessage()
              mail.From = New MailAddress("mygmailid@gmail.com", "Asked for help", System.Text.Encoding.UTF8)
              Mail.To.Add("sendtoemail@id")
              Mail.Subject = "A help query has been raised"
              mail.Body = frm_dashboard.user_data_fetch.Item(1, 0).Value.ToString + " " + ask_for_help.txt_message_ask_help.Text
              SmtpServer.Send(Mail)
              MessageBox.Show("Mail sent")
          Catch ex As Exception
              MsgBox(ex.ToString())
              MessageBox.Show("Oops something went wrong.")
          End Try
  </code></pre>
  
  <p>But this shows me this error:-</p>
  
  <p><img src="https://i.stack.imgur.com/30OQs.jpg" alt="enter image description here"></p>