Chilkat Tech Notes
Chilkat Tech Notes
Tips, techniques, and patterns for Chilkat developers
Chilkat Software

IMAP Login – BAD Command received in Invalid state

October 19, 2009 in Uncategorized

A Chilkat customer experienced the following behavior with Exchange Server in response to an IMAP login. This is the (edited) contents of the IMAP object’s SessionLog property:

----INFO----
Connecting to IMAP server at ***:143
----IMAP RESPONSE----
* OK The Microsoft Exchange IMAP4 service is ready.
----IMAP REQUEST----
aaab LOGIN "***"
----IMAP RESPONSE----
aaab BAD Command received in Invalid state.

Solution:
The IMAP server’s response is misleading.

In this case, the Exchange Server only allows SSL by default, so it was necessary to connect to port 993 with SSL on. Also, the login name needed to be domain\username.

Here is more information: IMAP Exchange Server Login.

Blogroll

  • * Release Notes
  • Chilkat Binary Encodings
  • Chilkat Character Encodings
  • Chilkat Home
  • Example Code
  • Generate Chilkat Code from Postman
  • How to Determine FTP Connection Settings
  • How To Register ActiveX DLLs
  • MSVC Runtimes for .NET Assemblies
  • Never Handle Non-Text Binary Data as a String
  • Online XML Signature Validators
  • Reference Documentation
  • SOAP WSDL to Chilkat Code
  • Socket Programming Must-Know Concepts
  • StackOverflow (Chilkat Software)
© 2025 Chilkat Tech Notes · All rights reserved.