title: VB.NET GMAIL SMTP Server Settings
body: <p>I am using the Following Code for my GMAIL Server SMTP Settings, but am unable to send emails.</p>
  
  <p>Can anyone help me out...</p>
  
  <pre><code>        Dim emailClient As New SmtpClient("mail.gmail.com")
          Dim SMTPUserInfo As New System.Net.NetworkCredential("xxxxx@gmail.com", "abc123")
  
          emailClient.UseDefaultCredentials = False
          emailClient.Port = 465
          emailClient.EnableSsl = True
          emailClient.Credentials = SMTPUserInfo
          emailClient.Timeout = 1000000
          emailClient.Send(mail)
  
          emailClient = Nothing
          SMTPUserInfo = Nothing
  
       Catch ex As Exception
          MessageBox.Show(ex.Message &amp; " Error Mails : ", Me.Text, MessageBoxButtons.OK)
      End Try
  </code></pre>