jmail 接收附件
for(long i = 1; i <= lCount; i++) {
_bstr_t a = pPOP3->GetMessageUID(i);
pMessage = pMessages->Item[i];
custom1.bstrSubject = pMessage->Subject;
custom1.bstrFrom= pMessage->From;
custom1.bstrBody = pMessage->Body;
custom1.FromName=pMessage->FromName;
jmail::IAttachmentPtr att;
jmail::IAttachmentsPtr atts = pMessage->Attachments; // 获取附件列表
long attNum = atts->Count;
cout<<"Attachment Num: "<<attNum<<endl; // 输出并下载所有附件
atts->Item[i]->SaveToFile(atts->Item[i]->Name); // 与已有文件同名会引起异常
cout<<"\n\n";
}
刚接触jmail,这是接收邮件的部分代码,我想接收附件,编译没有错误,就是加断点检验的时候执行到红色部分就跳到开始继续执行了,而且我不知道下载下来的附件放在什么地方,O(∩_∩)O谢谢各位了