Problem with sending email in 9.1.0 after update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • izito
    Junior Member
    • Apr 2025
    • 8

    #1

    Problem with sending email in 9.1.0 after update

    After updating to version 9.1.0, there's an issue with sending emails.
    Log:

    [2025-05-08 10:56:58] ERROR: (0) Email sending error: Connection could not be established with host "ssl://mail.itys.ru:465": stream_socket_client(): SSL opera>
    [2025-05-08 10:56:58] WARNING: Email sending:unknownError; 0

    Has anyone encountered this problem and found a solution?
  • victor
    Active Community Member
    • Aug 2022
    • 896

    #2
    Hi izito,

    Try replacing SSL/TLS => STARTTLS in your SMTP settings.

    If that doesn't work, please send a screenshot of your SMTP settings.

    Comment

    • izito
      Junior Member
      • Apr 2025
      • 8

      #3
      Hello @victor

      This is my settings:
      Click image for larger version

Name:	image.png
Views:	4
Size:	67.3 KB
ID:	117501

      I have a Exhange server and 465 port work only with STARTTLS.
      "Before updating to 9.1.0, everything worked with the same settings, but after the update, it stopped.

      In other applications, with similar settings, the connection goes through and emails are sent.

      Comment


      • victor
        victor commented
        Editing a comment
        Please try the following:

        - Port: instead of "465" => "587"
        - Security: instead of "SSL/TLS" => "STARTTLS"
    • izito
      Junior Member
      • Apr 2025
      • 8

      #4
      "Logs when attempting to connect on port 587:

      [2025-05-09 09:57:33] ERROR: (451) Email sending error: Failed to authenticate on SMTP server with username "info-from-lgc@lgcaesthetic.com" using the followin>
      [2025-05-09 09:57:33] WARNING: Email sending:unknownError; 0

      Overall, this is an expected result, as port 587 is not used on our Exchange server since we use port 465 with STARTTLS.

      Additional connection diagnostics:

      openssl s_client -starttls smtp -connect mail.itys.ru:587
      Code:
      Connecting to 195.72.249.195
      CONNECTED(00000005)
      Didn't find STARTTLS in server response, trying anyway...
      openssl s_client -starttls smtp -connect mail.itys.ru:465
      Code:
      Connecting to 195.72.249.195
      CONNECTED(00000005)
      depth=2 C=US, O=Internet Security Research Group, CN=ISRG Root X1
      verify return:1
      depth=1 C=US, O=Let's Encrypt, CN=R10
      verify return:1
      depth=0 CN=mail.itys.ru
      verify return:1
      ---
      Certificate chain
      0 s:CN=mail.itys.ru
      i:C=US, O=Let's Encrypt, CN=R10
      a:PKEY: RSA, 3072 (bit); sigalg: sha256WithRSAEncryption
      v:NotBefore: May 7 05:41:02 2025 GMT; NotAfter: Aug 5 05:41:01 2025 GMT
      1 s:C=US, O=Let's Encrypt, CN=R10
      i:C=US, O=Internet Security Research Group, CN=ISRG Root X1
      a:PKEY: RSA, 2048 (bit); sigalg: sha256WithRSAEncryption
      v:NotBefore: Mar 13 00:00:00 2024 GMT; NotAfter: Mar 12 23:59:59 2027 GMT
      ---
      Server certificate
      -----BEGIN CERTIFICATE-----​
      *****
      -----END CERTIFICATE-----
      subject=CN=mail.itys.ru
      issuer=C=US, O=Let's Encrypt, CN=R10
      ---
      No client certificate CA names sent
      Peer signing digest: SHA256
      Peer signature type: rsa_pkcs1_sha256
      Peer Temp Key: ECDH, secp384r1, 384 bits
      ---
      SSL handshake has read 3882 bytes and written 1736 bytes
      Verification: OK
      ---
      New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
      Protocol: TLSv1.2
      Server public key is 3072 bit
      Secure Renegotiation IS supported
      Compression: NONE
      Expansion: NONE
      No ALPN negotiated
      SSL-Session:
      Protocol : TLSv1.2
      Cipher : ECDHE-RSA-AES256-GCM-SHA384
      Session-ID: CD2D00000255EFB4FABC915FF0F3DFF6928DF4524EC44D8DF0 43D29A805DFCA5
      Session-ID-ctx:
      Master-Key: 91F9681C6BBC7CE49A2601AB14FDFC84B55F2A57A797BF5272 265E110A6CB6BE47258531BC4964BA87377D6A2049BE2D
      PSK identity: None
      PSK identity hint: None
      SRP username: None
      Start Time: 1746784545
      Timeout : 7200 (sec)
      Verify return code: 0 (ok)
      Extended master secret: yes
      ---
      250 SMTPUTF8​
      As we can see, the connection via port 465 works perfectly.
      And, once again, before updating to 9.1.0, everything worked great. It broke after the update.
      Last edited by izito; Today, 10:10 AM.

      Comment


      • victor
        victor commented
        Editing a comment
        Please try the previous option, but before that create a duplicate of your Email Account, and re-enter the password (deactivate or delete the old Email Account).

        Also try the option with 465 ssl/tls (re-enter the password).
    • izito
      Junior Member
      • Apr 2025
      • 8

      #5
      "I created a separate connector on the Exchange server on port 587 with STARTTLS support, and everything started working.

      Exchange does not support SSL/TLS, as it considers such a connection insecure. Setting up a separate Postfix gateway felt like too much effort.

      Overall, thanks for the consultations. This case turned out to be interesting.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8914

        #6
        In v9.1 we changed the email sending library. From laminas-mail (which is abandoned) to the Symfony Mailer. Not sure why it was working before and stopped now. Maybe the former had some fallback mechanism.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        Working...