This code create html content from xml using xslt. Xml contains the data that display in the html file and xslt file contains the design of the html file.
Dim sb As New StringBuilder
Dim xReader As New XmlTextReader(xmlPath) // path of the xml file
Dim xslt As New XslCompiledTransform()
xslt.Load(xsltPath) // path of the xslt file
Dim htmlWriter As TextWriter = New StringWriter(sb)
Now we got the html content in htmlWriter.ToString().
We are using this html content to send a mail. In out xslt contains the email template and xml contains the information what we send in the mail.