Dim msg As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
msg.BodyEncoding = Encoding.UTF8
msg.SubjectEncoding = Encoding.UTF8
Dim plainView As AlternateView = AlternateView.CreateAlternateViewFromString(PrintablePage.StripHTML(body).Trim, System.Text.Encoding.UTF8, "text/plain")
msg.AlternateViews.Add(plainView)
Dim userState As Object = msg
Response.Write(userState)
I extract the eml file and get the body message to be able to insert the database as varchar datatype. The problem here is that how to convert the eml file to string in vb.net. I am using .net 3.5 sp1 and Database is MSSQL 2008. Thanks in advance.