title: how to send an email with attachment in vb.net?
body: <p>how to do that?here is my current code, this is a windows form:</p>
  
  <pre><code>    mail.From = New MailAddress(TextBox2.Text)
      mail.To.Add(New MailAddress(TextBox1.Text))
      mail.Subject = TextBox3.Text
      mail.Body = TextBox4.Text
  
  
  
      mail.IsBodyHtml = True
  
  
      Dim client As SmtpClient = New SmtpClient("smtp.gmail.com")
      client.EnableSsl = True
      client.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox5.Text)
  
  
      Try
          client.Send(mail)
      Catch ex As Exception
          MessageBox.Show("Sending email failed. Please Try again")
  
  
      End Try
  </code></pre>