Posts Tagged ‘HTML-to-Text’

Fixed HTML-to-XML/Text regarding SPAN tags and maintaining SPACE chars before and after the SPAN tags.

Question:

Is it possible to use the email component in non-HTML mode only? For instance, I don’t want to be seeing HTML in the .Body after downloading the message from the server.

Answer:

Any given email can have a plain-text body, an HTML body, or both. The emailObject.Body property will contain the HTML body if present, or the plain-text body if not present. (Note: If you downloaded headers-only, the Body property will be empty or partial if using POP3.) This example shows how to get the plain-text or HTML body:

ASP: Email Body – Plain Text and/or HTML
SQL Server: Email Body – Plain Text and/or HTML
C#: Email Body – Plain Text and/or HTML
C++: Email Body – Plain Text and/or HTML
MFC: Email Body – Plain Text and/or HTML
C: Email Body – Plain Text and/or HTML
Delphi: Email Body – Plain Text and/or HTML
Visual FoxPro: Email Body – Plain Text and/or HTML
Java: Email Body – Plain Text and/or HTML
Perl: Email Body – Plain Text and/or HTML
PHP: Email Body – Plain Text and/or HTML
Python: Email Body – Plain Text and/or HTML
Ruby: Email Body – Plain Text and/or HTML
VB.NET: Email Body – Plain Text and/or HTML
Visual Basic: Email Body – Plain Text and/or HTML
VBScript: Email Body – Plain Text and/or HTML

For an email that contains only an HTML body, your will need to convert the HTML to plain-text. This example shows how (using the HTML-to-XML/Text component)

ASP: Convert HTML to plain-text
C#: Convert HTML to plain-text
C++: Convert HTML to plain-text
MFC: Convert HTML to plain-text
C: Convert HTML to plain-text
Delphi: Convert HTML to plain-text
Visual FoxPro: Convert HTML to plain-text
Java: Convert HTML to plain-text
Perl: Convert HTML to plain-text
PHP: Convert HTML to plain-text
Python: Convert HTML to plain-text
Ruby: Convert HTML to plain-text
VB.NET: Convert HTML to plain-text
Visual Basic: Convert HTML to plain-text
VBScript: Convert HTML to plain-text