开发者

Read HTML Body from Outlook MSG file

开发者 https://www.devze.com 2023-01-03 22:53 出处:网络
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开发

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号