How to Convert a HTML Email to Plain Text on Vb.Net

VB.NET allows programmers to send plain text or HTML-formatted email messages. A plain text email has no formatted text such as colors, paragraph settings or different font styles. To convert from an HTML email to a plain text email, you must strip out all HTML tags in the "HtmlBody" property and switch the text to the "Body" email property, which sets the email type to "plain text."

Instructions

    • 1

      Click the Windows "Start" button and click "All Programs." Click "Microsoft .NET Framework," and then click "Visual Studio" to open the VB.NET program. Open your Web project after VS loads.

    • 2

      Double-click the coding file that contains the email message and settings. Scroll down to the section of the code labeled "email.HtmlBody." Find the HTML tags in the message.

    • 3

      Delete each HTML tag in the HtmlBody property. Removing these tags strips the message of all formatting, but leaving the message in the HtmlBody still leaves the HTML content.

    • 4

      Delete the "HtmlBody" property and change it to "Body." The "Body" property sets the message to plain text.

    • 5

      Save the file and click "Run" to test the new email. Instead of HTML formatted messages, your users will receive messages in plain text.

Related Searches:

References

Comments

Related Ads

Featured