Read HTML Body from Outlook MSG file
How can I read the HTML body from an Outlook.MSG file using Delphi code.
I have been using Scalabiums smmsg component, but it only the body text returns a value, the the html body property always开发者_运维百科 returns an empty string.
Thanks,
Phillip.
I've always had good luck using the Outlook Redemption library. Check it out here http://www.dimastr.com/redemption/
Your question contains the .net tag so maybe this thread is helpful:
How to convert .msg to .eml
For example:
Save a mail as a file with MailMessage :
_SmtpClient.PickupDirectoryLocation = "C:\\"; _SmtpClient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory; _SmtpClient.Send(_Mail);
Then, Indy (Internet Direct) can be used which provides a procedure in the TIdMessage
class (unit IdMessage) to read a SMTP message from file
procedure TIdMessage.LoadFromFile(const AFileName: string;
const AHeadersOnly: Boolean = False);
精彩评论