سؤال

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