Error while sending the mail....
Try
Dim Msg As New MailMessage()
' Sender e-mail address.
Msg.From = New MailAddress(txtUsername.Text)
' Recipient e-mail address.
Msg.[To].Add(txtTo.Text)
Msg.Subject = txtSubject.Text
' File Upload path
Dim FileName As [String] = fileUpload1.PostedFile.FileName
Dim mailbody As String = txtBody.Text + "<br/><img src=cid:companylogo>"
Dim myimage As New LinkedResource(FileName)
' Create HTML view
Dim htmlMail As AlternateView = AlternateView.CreateAlternateViewFromString(mailbody, Nothing, "text/html")
' Set ContentId property. Value of ContentId property must be the same as
' the src attribute of image tag in email body.
myimage.ContentId = "companylogo"
htmlMail.LinkedResources.Add(myimage)
Msg.AlternateViews.Add(htmlMail)
' your remote SMTP server IP.
Dim smtp As New SmtpClient()
smtp.Host = "smtp.gmail.com"
smtp.Port = 587
smtp.Credentials = New System.Net.NetworkCredential(txtUsername.Text, txtpwd.Text)
smtp.EnableSsl = True
smtp.Send(Msg)
Msg = Nothing
Catch ex As Exception
Console.WriteLine("{0} Exception caught.", ex)
End Try
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "alert", "alert('Send to Mail Id ');window.location='Default2.aspx';", True)