Exception connecting to Mail Server: Command is not valid in this state.

SOLVED

We use E-mail Management Server Options to receive support emails from the local Exchange Server.
Since a Windows update or a certificate change on the Exchange, we have been receiving the following error message:

2025-01-08 08:28:46.939> Exception connecting to Mail Server: Command is not valid in this state.

Where can I find a log with the exact reason why the POP account is no longer accessible?

We use Sage CRM 2024 R2 and Exchange 2019 CU14.

I look forward to any answer.
S. Schmidt

  • +1
    verified answer

    Hi

    Microsoft Exchange may be trying to indicate that it's not configured to allow unencrypted passwords. To resolve this, you can enable TLS, aka SSL, in the settings.

    In Sage CRM 2024 R2, to use SSL with your POP3 settings, you should select the option to use TLS for POP. Here are the steps:

    1. Go to <My Profile> | Administration | Email and Documents | Email Management Server Options .
    2. Select the checkbox for "Use TLS for POP".

    This will enable the use of TLS, a successor to SSL, in your POP3 settings. Sage CRM will automatically negotiate the correct version of TLS with the email server.

    I hope this helps.

  • 0 in reply to Sage CRM

    Thank you for your feedback.

    So far it has always worked with Use TLS for POP and Port 110
    Now I have checked the port. When I open Outlook Web Access and look at the options, under Pop settings it says:

    Server name: autodiscover.<domain>.
    Port 995
    Encryption method: SSL

    When I change the port to 995 in the CRM, I get the following error message:

    2025-01-08 13:55:42.856> Exception connecting to Mail Server: Error connecting with SSL.
    error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

    Can anyone help?

  • 0 in reply to ITSn

    If you've not already done so, I think you should log a case with your local Sage team.  

  • 0 in reply to Sage CRM

    Thank you very much for your help.
    It seems to be a problem on the Exchange Server. After a POP request the Exchange logs the following error:

    A certificate for the host name "autodiscover.<domain>" couldn't be found. SSL or TLS encryption can't be made to the POP3 service.