Frage

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;
War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top