Get error message when "BAD error_here" is sent from imap4 server
I have a client TIdImap4
and I sometimes get it from the imap server:
C3 BAD Mailbox parameter is invalid.
I was able to fix the request from my client, but the only way I could read this error message was in the indy function:
function TIdIMAP4.GetInternalResponse(const ATag: String;
AExpectedResponses: array of String;
ASingleLineMode: Boolean; ASingleLineMayBeSplit: Boolean {= False}): string;
but when the result function TIdIMAP4.StatusMailBox(const AMBName: String; AMB: TIdMailBox; const AStatusDataItems: array of TIdIMAP4StatusDataItem): Boolean;
is False, I don't know how to access the error message. I've tried properties:
- imap4Client.LastCmdResult.Text.Text
- imap4Client.LastCmdResult.FormattedReply.Text
but there is no error message in them.
+3
source to share