login about faq

The Imap.Login method fails and the Exchange Server returns an error indicating "BAD Command Received in Invalid State". What is wrong?

asked Nov 01 '12 at 15:05

chilkat's gravatar image

chilkat ♦♦
11.8k316358420


What it means is that the Exchange Server does not allow the login and password to be sent over an unencrypted TCP connection. The "invalid state" refers to the fact that the connection is not SSL/TLS. Modify your code to instead use the IMAP SSL/TLS port (993) by setting the Imap.Port = 993, and also set the Imap.Ssl = true (for implicit SSL/TLS). It is also possible to use explicit SSL/TLS by keeping the default port value (143), but set the Imap.StartTls property = true. Explicit SSL/TLS is where the client connects with an unencrypted TCP connection, and then prior to the login, automatically converts to SSL/TLS via the STARTTLS command (assuming the IMAP server supports the STARTTLS extension).

link

answered Nov 01 '12 at 15:10

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×174
×12
×11
×9
×7

Asked: Nov 01 '12 at 15:05

Seen: 25,089 times

Last updated: Nov 01 '12 at 15:10

powered by OSQA