Re: HTML - Newbie question

Giganews Newsgroups
Subject: Re: HTML - Newbie question
Posted by:  Don (kingfi…
Date: Tue, 13 Dec 2005

> If I send a HTML email from Outlook Express and receive it using the V10
> MailDemo application, the message body is received as plain text, e.g.

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
> <META content="MSHTML 6.00.2900.2769" name=GENERATOR>
> </HEAD>
> <BODY bgColor=#ffffff>
> <DIV><FONT face=Arial size=2>email test 1 - no
> att</FONT></DIV></BODY></HTML>

> Am I correct in assuming that Indy cannot decode/parse a HTML message at
> this time? I notice that in one of the units (idMessage.pas) it lists
> idHTML as a todo.

Indy should handle any valid content-transfer encoding applied to the
message body (as defined in the RFCs).  But it is not designed to parse or
render the HTML content (or any other MIME type for that matter) in any way;
Indy provides only the transport and an OOP representation of the message

Use TWebBrowser, the Mozilla ActiveX control,  or THTMLViewer to render HTML
content.  There are also any number of HTML parsers out there; the JEDI JVCL
includes an Open Source version.  If the content is well-formed content,
you could even use an XML parser. The example you posted is not well-formed;
it has unquoted attribute values.




In response to

HTML - Newbie question posted by Mike O'Grady on Tue, 13 Dec 2005