In Indy9, there was a method of the TIdImap class called GetLineResponse. This method has been removed in Indy10, so I'm wondering what I should use instead of this command in Indy10.

Here's an example of how I was using GetLineResponse in Indy9 as part of a method to download the first so many lines or bytes of an email:

IMAP.WriteLn('xx FETCH '+IntToStr(MsgNum)+' BODY.PEEK[TEXT]<0.'+
             IntToStr(LineCount*70)+'>');
Result := IMAP.GetLineResponse('xx',[wsOK]) = wsOK;
有帮助吗?

解决方案

There is no equivalent of TIdIMAP4.GetLineResponse() in Indy 10. Use TIdIMAP4.GetResponse() instead (which also exists in Indy 9). Or better, use TIdIMAP4.SendCmd() instead (which also exists in Indy 9) and let it handle the response for you.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top