求idpop收取邮件后,对=?gbk?b?。解码的代码。。。。

beilas 2007-06-20 11:36:49
RT。。。
...全文
271 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
LuoGD 2007-06-20
  • 打赏
  • 举报
回复
NMPOP的参考
try
{
NMPOP31->Connect();
while(started)
{
NMPOP31->GetMailMessage(nob);
subject = NMPOP31->MailMessage->Subject;
body = NMPOP31->MailMessage->Body->Text;

try{
Decoder1->Reset();
Decoder1->IgnoreNotification = true;
AnsiString d_body, aline, cr = "\r\n";
int p = body.Pos("File \"");
p = body.Pos("\r\n");
if(p<1){
p = body.Pos("\n");
cr = "\n";
}
while(p > 0){
aline = body.SubString(1,p-1);
body = body.SubString(p+ cr.Length(),body.Length());
try{
Decoder1->Reset();
Decoder1->IgnoreNotification = true;
Decoder1->CodeString(aline);
aline = Decoder1->CompletedInput();
if(aline.SubString(1,2) == "0;")
aline = aline.SubString(3,aline.Length());
}catch(...){}
d_body += aline;
p = body.Pos(cr);
}
body = d_body;

/*int p = body.Pos("File \"");
if(p > 1)
body=body.SubString(1,p-1);
Decoder1->CodeString(body);
body = Decoder1->CompletedInput();*/

}catch(...){}

1,317

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder 网络及通讯开发
社区管理员
  • 网络及通讯开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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