Issue with IMAPLibrary2 in Robot Framework: User Authenticated but Not Connected

Hello everyone,

I’m encountering an issue while using IMAPLibrary2 in Robot Framework, particularly when running tests on Jenkins with Docker. The problem arises with the following error message: “User is authenticated but not connected.”

Steps I’ve Taken:

  1. Verified that IMAPLibrary2 is installed (pip show imaplibrary2).
  2. Confirmed successful connection via telnet 993.
  3. Run docker with docker run --network host
    Additional Context:
  • The issue occurs consistently on Jenkins with Docker but works fine locally.

Hi Sergiy,

This is probably the clue to solving your issue, start trying to identify the differences.

  • Do you have docker installed locally?
  • if so does it work in docker when you run it locally that way?

From what you’ve said It sounds like the issue is outside Robot Framework and IMAPLibrary2, but hopefully this reply will set you in the right direction to finding the problem,


1 Like


I’m not an outlook user both for mails and RF side, but earlier when trying to use IMAP Library with Gmail I had also this, prior to use app password.
The issue were the credentials (I used mine first to test behavior).

The message was the same (visible is RF), and directly on the login here:

    imap = imaplib.IMAP4_SSL(imap_host)
    imap.login(imap_user, imap_pass)

I don’t know how outlook manages these credentials, but that might be a hint too.


1 Like