How to Use Indy 10 Imap Intercept function for Logging

It took me a while to track down enough information to figure out how to use Imap.Intercept to log raw IMAP client/server communication to troubleshoot an SSL account issue, so thought I’d share a basic code snippet on how to have IMAP log to disk the communications.

idLogFile1 : TidLogFile;
IMAP := TIdIMAP4.Create(nil);

idLogFile1 := TidLogFile.Create(nil);
idLogFile1.Filename := 'C:\temp\imaplog.txt'; := True;

IMAP.Intercept := idLogFile1;


One thought on “How to Use Indy 10 Imap Intercept function for Logging”

  1. Dear Jessica,

    Here Joaquim, yes this snippet told me what I was doing wrong on behalf of that connection as well.
    Many thanks for it.

Leave a Reply

Your email address will not be published. Required fields are marked *