社区
网络通信/分布式开发
帖子详情
用indy9的idpop3收信后应该怎样解码?
sunseave
2004-05-08 03:54:36
请高手提供代码参考,谢谢
本人用的是DELPHI5
...全文
67
1
打赏
收藏
用indy9的idpop3收信后应该怎样解码?
请高手提供代码参考,谢谢 本人用的是DELPHI5
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
whxhz80
2004-05-13
打赏
举报
回复
可以直接这样用..
Caption := Base64Decode(IdMessage.From.Text);
Caption := Base64Decode(IdMessage.Subject.Text);
以下是自己写的,利用Indy9內建De/EncoderMIME解码..
//------------------------------------------------------------------------------
//Base64Decode
//------------------------------------------------------------------------------
function TMainForm.Base64Decode(strInput : string) : string;
var
strDecode : string;
posStart: Integer;
posEnd : Integer;
begin
while pos('=?gb2312?b?',lowercase(strInput)) > 0 do
begin
try
posStart := pos('=?gb2312?b?',lowercase(strInput));
posEnd := pos('?=',lowercase(strInput));
strDecode := strDecode + copy(strInput,1,posStart-1) + IdDeMIME.DecodeString(copy(strInput,posStart+11,posEnd-posStart-11));
strInput := copy(strInput,posEnd+2,length(strInput)-posEnd-1);
finally
Application.ProcessMessages;
end;
end;
strDecode := strDecode + strInput;
result := strDecode;
end;
//------------------------------------------------------------------------------
//Base64Encode
//------------------------------------------------------------------------------
function TMainForm.Base64Encode(strInput : string) : string;
var
strEncode : string;
begin
strEncode := IdEnMIME.EncodeString(strInput);
result := strEncode;
end;
//------------------------------------------------------------------------------
PS.
IdDeMIME是IdDecoderMIME
IdEnMIME是IdEncoderMIME
D7下删除
indy
9安装
indy
10的方法说明付
indy
10.rar
delphi7下删除
indy
9控件,安装
indy
10的方法,内付图文说明,
indy
10控件,已经测试,可用。
Indy
9,
indy
10,delphi
indy
9、
indy
10
Indy
9控件及使用Demo
Indy
9控件及使用Demo
Indy
9及全部演示代码: ---------------------------------- BasicClientServer CGIMailer Chat DayTimeServer DemoBaseServer DNSResolver Client Echo Finger FTP HTTPServer
Id
DateTime ...
Indy
9 使用方法大全
详细介绍
Indy
9的使用方法,HDML格式。
Indy
10.5.9
Indy
10.5.9
Indy
最新版
Indy
网络通信/分布式开发
1,593
社区成员
32,964
社区内容
发帖
与我相关
我的任务
网络通信/分布式开发
Delphi 网络通信/分布式开发
复制链接
扫一扫
分享
社区描述
Delphi 网络通信/分布式开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章