Exchange Connection Problems

Fix Microsoft 365 SMTP Connection Refused on Port 587

Nimra MalikNimra Malik Nov 25, 2026 868 views

Question details

Resolve an application's refused connection to Microsoft 365 SMTP on port 587.

Fix Microsoft 365 SMTP Connection Refused on Port 587
Product
Microsoft 365 Exchange Online SMTP
Device & OS
not provided
Scenario
An application uses authenticated SMTP to send mail through a Microsoft 365 mailbox.
Observed behavior
The application reports a connection refused error even though TLS and port 587 are configured.
Before you start

Identify the server running the application and obtain its SMTP settings and full error message. Run network tests from that server or its network, not from an unrelated device.

Solution 1Recommended

Verify the Microsoft 365 SMTP submission settings

Use the correct client submission endpoint and check whether authenticated SMTP is available for the mailbox.

1
Check the SMTP endpoint

Open the application's outgoing mail or SMTP settings. Set the server to smtp.office365.com and the port to 587.

2
Select STARTTLS

In the application's SMTP security settings, select STARTTLS, sometimes labeled explicit TLS, rather than implicit SSL/TLS.

3
Check mailbox authentication

In the Microsoft 365 admin center, go to Users > Active users, select the sending user, and open Mail > Manage email apps. Check whether Authenticated SMTP is enabled; also have an administrator verify tenant-level settings and supported authentication methods.

4
Retry and inspect the error

Save the SMTP settings and send a test message from the application. Record the full error and whether it occurs during connection, TLS negotiation, or authentication.

Verify the Microsoft 365 SMTP submission settings
Connection and authentication are separate: A refused TCP connection occurs before SMTP authentication. Enabling authenticated SMTP alone will not fix a blocked or refused network connection.
Free Microsoft Office alternative

Use WPS Office for Documents While You Troubleshoot SMTP

WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility, making it easy to move everyday document work. It does not repair Microsoft 365 SMTP connections.

Continue working on documents while an administrator investigates SMTP connectivityCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar document, spreadsheet, and presentation toolsFree and lightweight for everyday office work
microsoft office alternative - wps office

Frequently Asked Questions

Which server and security setting should I use for Microsoft 365 SMTP?

For authenticated client submission, configure smtp.office365.com on port 587 and select STARTTLS, also called explicit TLS.

Why does Outlook on the web work when my application cannot connect?

Outlook on the web and your application may use different network paths and protocols. A working web mailbox does not establish that the application server can reach smtp.office365.com on port 587.

How can I test port 587 from a Windows server?

Open PowerShell on the application server and run Test-NetConnection smtp.office365.com -Port 587. Check the TcpTestSucceeded result and share a failed test with your network administrator.

Does enabling authenticated SMTP fix a connection refusal?

Not by itself. A refused connection occurs before authentication, so first verify the endpoint and network access. Authenticated SMTP and a supported authentication method are still needed when the application reaches the server.