SMTP
TCP/TLS failure (common in Sage 50) means the connection handshake never finished. Fix the host, port, and TLS mode, then use OAuth2 or an app password.
Updated Jul 1, 2026
The short answer
"An unknown error occurred connecting to the SMTP server" is an application catch-all (common in Sage 50 and desktop mail clients), not an RFC reply code. It means the program could not complete the TCP/TLS connection or login handshake. Fix it by correcting the host, port (587 for STARTTLS or 465 for implicit TLS), and TLS setting, allowing those ports through your firewall, and using modern authentication (OAuth2 or a Gmail app password), since Google disabled Basic Auth in 2022 and Microsoft is phasing it out.
"An unknown error occurred connecting to the SMTP server" is a generic, application-generated message — not a standard SMTP reply code. It is produced by the sending program (most commonly Sage 50, but also Outlook, Thunderbird, and other mail clients) when it tries to open a connection to an outgoing mail server and the attempt fails before a meaningful response can be read. Because the client cannot map the failure to a specific SMTP reply (e.g. RFC 5321's 421 or RFC 3463 enhanced codes), it falls back to "unknown error."
In practice this almost always means one of three things failed: the TCP socket to the server, the TLS/SSL handshake, or the authentication step.
The label is a catch-all, so the real cause is usually one of these:
Work from the most common cause outward:
Outlook.com / Microsoft 365: app passwords and Basic Auth for SMTP AUTH still work today, but they're being retired — admin-reversible "disabled by default" lands at the end of 2026, with full removal to follow (date not yet set). Switch to OAuth2 / modern authentication proactively rather than waiting for the cutover. For Sage 50 specifically, Sage recommends switching from webmail to a default desktop email program (Classic Outlook — not New Outlook) via Setup > Settings > Company > Email.
smtp.gmail.com — port 587 with STARTTLS, or port 465 with SSL/TLS.smtp-mail.outlook.com — port 587 with STARTTLS.Make sure the client's "SSL/TLS" vs "STARTTLS" setting matches the port; a mismatch breaks the handshake before login.
Open the ports in your firewall/antivirus. Allow outbound 25, 465, and 587 and add the SMTP host to the trusted/allow list. As a test, briefly disable antivirus/VPN/proxy and resend; if it works, allowlist the client instead of leaving protection off. After a client update, remove and re-add the app to the trusted list.
Confirm reachability. From the sending machine, test the connection directly — e.g. openssl s_client -connect smtp.gmail.com:465 (implicit TLS) or openssl s_client -starttls smtp -connect smtp.gmail.com:587. A clean TLS banner rules out network/DNS/firewall problems and points you back at credentials.
Confirm the account is active and the password hasn't expired or been reset.
If you are sending through a notifications platform like Courier, you configure the SMTP host, port, encryption, and credentials once in the provider settings — the same checklist applies, but you only fix it in one place rather than per-client.
References
FAQ
No. It is not an RFC 5321 reply code or an RFC 3463 enhanced status code. It is a generic message produced by the sending application (commonly Sage 50, Outlook, or Thunderbird) when the TCP, TLS, or authentication step fails before the server returns a specific code.
One API, every provider
Courier connects to your email, SMS, and push providers, handles retries and failover, and surfaces delivery errors in plain language.
Last reviewed Jul 1, 2026. Courier is not affiliated with third-party providers; error behavior may vary by implementation.
© 2026 Courier. All rights reserved.