title: Sending HTML email containing images in mail body VB.NET
body: <p>I am working on a Mail App in VB.NET. The mail app sends mail in two steps :</p>
  
  <p><strong>1.It converts the Email body(rtf) to HTML</strong></p>
  
  <p><strong>2.Then it sends the converted HTML as the email body</strong></p>
  
  <p>For these, i am using <strong>EASendMail(to send email),Itenso RTF2HTML converter(to convert RTF to HTML)</strong>. Now my email body is basically a RichTextBox(bodytxt.text).The code used are :</p>
  
  <pre><code>  Imports Itenso.Rtf.Converter.Html
    Imports EASendMail
    Imports Itenso.Rtf.Support
    Imports Itenso.Rtf
  
     Dim rr As String = bodytxt.Rtf.Replace("\0", "")
     Dim rtfDocument As IRtfDocument = RtfInterpreterTool.BuildDoc(rr)
     Dim htmlConverter As New RtfHtmlConverter(rtfDocument)
     Dim html1 As String = htmlConverter.Convert()
  
      Dim oMail As New SmtpMail("TryIt")
              Dim oSmtp As New EASendMail.SmtpClient()
              oMail.From = fromtxt.Text
              oMail.To = New AddressCollection(totxt.Text)
              oMail.Subject = subjecttxt.Text
              oMail.HtmlBody = html1
              Dim oServer As New SmtpServer(MailConfig.host.Text)
              oServer.Port = MailConfig.port.Text
              oServer.ConnectType = SmtpConnectType.ConnectSSLAuto
              oServer.User = fromtxt.Text
              oServer.Password = MailConfig.password.Text
              Dim r As Integer
              If ListBox1.Items.Count &lt;= 0 Then
              Else
                  oMail.AddAttachment(ListBox1.Items(r))
              End If
              oSmtp.LogFileName = Application.StartupPath &amp; "\maillog.OFPTX"
  
              oSmtp.SendMail(oServer, oMail)
  </code></pre>
  
  <p>Now this code works fine and sends the email as HTML-maintaining all text formatting . The problem is, suppose i add an image in the rich textbox, then the image is sent but it can't be opened/viewed from my mail client's inbox.In Gmail, It shows as a broken image and "Open image in new tab" show "We can't display this image"...</p>
  
  <p><strong>1.What am i doing wrong ?How to send the image not as an attachment but a part of the email body ?</strong></p>
  
  <p><strong>2.Can my code be improved ?</strong></p>