What your library says, and what the server said

Almost no library shows you the refusal. It catches the server’s line, throws away everything except the fact that something failed, and prints a sentence of its own — the same sentence it has printed for every SMTP failure for a decade.

So the message you are searching for is not the message that explains anything. This table connects the two.

Your library prints The server actually said
SMTP Error: Could not authenticate.
PHP · PHPMailer
Authentication unsuccessful, basic authentication is disabled
SMTP connect() failed.
PHP · WordPress / WP Mail SMTP
Authentication unsuccessful, basic authentication is disabled
Invalid login: 535 5.7.139 Authentication unsuccessful
Node.js · Nodemailer
Authentication unsuccessful, basic authentication is disabled
smtplib.SMTPAuthenticationError: (535, b'5.7.139 ...')
Python · Python smtplib
Authentication unsuccessful, basic authentication is disabled
curl: (67) Login denied
shell · curl
Authentication unsuccessful, basic authentication is disabled
SmtpException: The SMTP server requires a secure connection or the client was not authenticated.
.NET · .NET and PowerShell
Authentication unsuccessful, basic authentication is disabled

Why this is worth a table

Three of the four things that produce these errors are reversible by anybody with tenant rights. The fourth is the end-of-December-2026 default change, and an administrator can undo that one too — until Microsoft names the final removal date, which it says it will do in the second half of 2027.

The library’s message cannot tell them apart. The server’s line always can. Every page above starts with how to make your library print it.

Missing your library? Send the exact string and what produced it.

Last reviewed 2026-08-27.

Updated 29 Aug 2026

mx.msgwing.com587 STARTTLS · 465 SSL/TLS Register free