Question

What are possible causes to look into for an "EIdReplyIMAP4Error" exception?

This is in regards to connecting to an IMAP4 account using SSL/TLS. sslvSSLv23 for the SSLOptions.Method and utUseImplicitTLS for the UseTLS setting. the error was reported by an XP user, so I'm not sure if this might be a TLS version compatibility issue, or something completely unrelated. The documentation for Indy10 is a bit vague about what this error means.

Was it helpful?

Solution

Any EIdReply... exception means that the server returned a protocol-appropriate error reply in response to a command that your app sent to it. In this case, your app sent an IMAP-related command, and the server replied with an IMAP-related error. The properties of the EIdReply... exception contain the server's error details (error codes, string messages, etc).

Some TIdIMAP methods send single commands, but other methods send multiple commands internally, so to really know which exact command is failing, you need to log the actual commands/responses being exchanged. Since SSL/TLS is involved, that usually rules out using an external sniffer, like WireShark. However, Indy has its own logging capabilities. You can attach one of Indy's TIdLog... components, such as TIdLogFile orTIdLogEvent, to the TIdIMAP.Intercept property. That will capture all of the pre-encrypted/post-decrypted data being sent back and forth. Then you can troubleshoot what the server is complaining about.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top