How Can I Read Email With Html Format In A Delphi Application?
I have created a program that can read email from Exchange 2007. However, it can only read the body of the email in plain-text format. When I tried to retrieve email in HTML format
Solution 1:
The contents of MIME-encoded emails, such as HTML emails (if plain-text and/or attachments are also present) are stored in the TIdMessage.MessageParts
property, not in the TIdMessage.Body
property. You need to look at the email's actual ContentType
property to know which property TIdMessage
parsed the email into.
Solution 2:
Using MAPI, I usually try to get the PR_BODY_HTML
property as string; if that’s empty, I retrieve the PR_HTML
property.
const
PR_HTML = $10130102;
PR_BODY_HTML = $1013001E;
This usually works for me. Of course, maybe you’re using different technology altogether, but you’re not giving us much to work with...
Post a Comment for "How Can I Read Email With Html Format In A Delphi Application?"