SMTP Error 296 with Yandex IMAP/SMTP account (IMAP OK, SMTP fails)

I have been unable to send email from Mailspring using my Yandex account for the last 5 days, even though IMAP connects successfully and other mail clients (using the same app password) work fine. IMAP and SMTP are both configured with an app password, two‑factor authentication is enabled on the account, and IMAP access is enabled in Yandex’s web settings.

When testing the connection, the IMAP session completes login and namespace listing without errors:

  • Server: imap.yandex.com:993 (IMAP4rev1 with TLS)

  • IMAP log excerpt (sanitized):

    • * OK Yandex IMAP4rev1 ... ready to talk ...

    • TLS ssl connect imap.yandex.com 993

    • 1 CAPABILITY1 OK CAPABILITY Completed.

    • 2 LOGIN "tucao@xxx" *********2 OK LOGIN Completed.

    • 3 NAMESPACE3 OK NAMESPACE Completed.

    • 4 XLIST "" "*"

So IMAP authentication and basic commands succeed.

However, the SMTP test fails with mailsmtp Last Error Code: 296 even though the server advertises standard capabilities and authentication methods.

  • Server: mail-nwsmtp-smtp-production-main-xx.klg.yp-c.yandex.net (Yandex SMTP)

  • OpenSSL version on client: OpenSSL 3.6.0 1 Oct 2025

  • SMTP log excerpt (sanitized):

    • 220 mail-nwsmtp-smtp-production-main-xx.klg.yp-c.yandex.net Ok ...

    • EHLO DESKTOP-xxxxxxx

    • 250-mail-nwsmtp-smtp-production-main-xx.klg.yp-c.yandex.net

    • 250-8BITMIME

    • 250-PIPELINING

    • 250-SIZE 53477376

    • 250-STARTTLS

    • 250-AUTH LOGIN PLAIN XOAUTH2

    • 250-DSN

    • 250 ENHANCEDSTATUSCODES

Mailspring then reports:

  • SMTP Last Response Code: 250

  • SMTP Last Response: capabilities list as above

  • SASL_PATH: (empty)

  • mailsmtp Last Error Code: 296

  • mailsmtp Last Error Explanation: Unknown

  • mailsmtp Last Error Location: 10

  • mailsmtp Last Auth Type: 2

From the server’s point of view, the handshake and EHLO succeed, but Mailspring stops at this point with error 296 instead of proceeding with AUTH, similar to other reports where SMTP code 296 appears as an internal MailCore/Mailspring SMTP auth/handshake failure.

Steps to reproduce

  1. Enable IMAP and create an app password for mail in Yandex account settings (https://mail.yandex.com/#setup/client).

  2. In Mailspring, add a new IMAP/SMTP account using the Yandex address (tucao@xxx) and the Yandex mail app password.

  3. Let Mailspring autodetect imap.yandex.com:993 (TLS) and Yandex SMTP host (with TLS/STARTTLS) and complete setup.

  4. Try to send a test email or run “Check mail” / connection test.

Expected behavior
The Yandex account should send emails normally via SMTP, as it does in other clients (e.g. Thunderbird/Outlook) using the same app password and server settings.

Actual behavior

  • IMAP: connects and authenticates successfully, mailbox is listed with no errors.

  • SMTP: fails immediately after EHLO with mailsmtp Last Error Code: 296 (Unknown) and does not proceed to AUTH, so sending mail is impossible.

Environment

  • Email provider: Yandex Mail (with app password and IMAP enabled).

  • OS: Windows 11

  • Mailspring version: 1.17.2-a312df89

  • Network: same machine and network where other mail clients connect and send via Yandex SMTP successfully.

Thanks,

I’ve temporarily fixed it by reverting to version 1.17.1 and disabling updates by navigating to C:\Users\Your_user_name\AppData\Local\Mailspring and deleting update.exe.

Hi folks, thanks for reporting this - I’m sorry this made it into production. This has been fixed in Mailspring 1.17.3, which was released Jan 31. The app should have already updated to that version, or you can grab it from the website.

I really appreciate your patience. If it’s any consolation, this was a result of a major upgrade to a new build pipeline and OpenSSL 3, which puts Mailspring on a solid foundation for another decade of security patches and new features.

We have automated tests that ensure mailsync can connect to IMAP and SMTP, but this particular problem didn’t surface until you /logged in/ to the SMTP server to send mail. I’ve updated our Github Actions to actually perform the login step so we can verify this never happens again.

1 Like