IdMessage读取eml内容报


本文整理自网络,侵删。

 用IdMessage读取eml文件的时候,body的内容为:This is a multi-part message.

解决办法:

uses IdText;

for j := IdMessage.MessageParts.Count-1 downto 0 do
begin
if (IdMessage.MessageParts[j] is TIdText) and
(IdMessage.MessageParts[j].ContentType = 'text/html') then
begin
memo1.text := (IdMessage.MessageParts[j] as
TIdText).Body.Text;
Break;
end;
end;

相关阅读 >>

Delphi 字母大小写转换

Delphi firedac 连接access mdb数据库的方法

Delphi createprocesswithlogonw用法

Delphi 不重启不注销不关explorer刷新注册表

Delphi indy 10.5.7的数据发送接收的用法

Delphi tstrings类的一些技巧

Delphi rgb 画出三角形

Delphi实现变速齿轮

Delphi html转义

Delphi 正则表达式起步

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...