我用mail2000这个控件登录邮件服务器下载邮件的(附件)时,下载下来的附件有问题,请达人进来指点一下。附上我写的源码。

fanli625 2003-12-01 04:04:24
附件下载下来都成打不开的文件了。
附上我写的下载段源码:
procedure TConnect_download.Downloadnewmail_writedailyrecord(Sender:TObject);
var
index,loop:integer;
path:string;
temp:TMemoryStream;
begin
for index:=1 to POP.SessionMessageCount do
begin
Show2.Caption:='开始从'+mailmanageini.ReadString('mail','host','')+'接收第'+inttostr(index)+'封邮件....';
POP.RetrieveMessage(index);
if Msg.AttachList.Count>0 then
begin
for Loop := 0 to Msg.AttachList.Count-1 do
begin
path:=ExtractFilePath(ParamStr(0))+'AFP\'+Msg.AttachList[loop].FileName;
temp:=TMemoryStream.Create;
Msg.AttachList[loop].Decoded.SaveToStream(temp);
temp.Position:=0;
temp.SaveToFile(path);
Msg.AttachList[loop].SaveToFile(path);
end;
Msg.Reset;
end;
end;
Show2.Caption:='邮件接收完成';
Show_dailyrecord(Sender);
end;
达人指点是怎么回事。
...全文
136 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
fanli625 2003-12-02
  • 打赏
  • 举报
回复
up
mmkill 2003-12-02
  • 打赏
  • 举报
回复
哪里下载mail2000控件啊,支持代理吗?我给我一份:ysmsoft@eyou.com,我愿意交换
fanli625 2003-12-01
  • 打赏
  • 举报
回复
up

1,594

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧