logo
search
Exchange Connection Problems

How to Fix Microsoft 365 SMTP Connection Closes After QUIT Command

Khadija KhanKhadija Khan Sep 28, 2026 869 views

Question details

The user encounters a diagnostic error when an authenticated SMTP connection to Microsoft 365 closes unexpectedly after issuing the QUIT command.

How to Fix Microsoft 365 SMTP Connection Closing After QUIT Command
Product
Microsoft 365 Exchange
Device & OS
not provided
Scenario
Attempting to send an email or test an SMTP connection via smtp.office365.com on port 587 using TLS with valid credentials.
Observed behavior
The connection successfully authenticates but terminates immediately after the QUIT command is sent, returning diagnostic error information instead of closing gracefully.
Before you start

Verify that your local firewall or antivirus software is not actively scanning or terminating outbound SMTP traffic on port 587.

Solution 1Recommended

Test the SMTP Connection on an Alternative Network

Switching to a different network helps determine if your current Internet Service Provider (ISP) or local router is prematurely terminating the SMTP session.

Network-level security appliances or ISP configurations can sometimes interfere with SMTP traffic, especially during the termination phase of the connection. Bypassing your primary network is the fastest way to isolate the issue.

1
Disconnect from your current network

Turn off your current Wi-Fi or unplug your Ethernet cable to disconnect from the local network environment where the error occurs.

2
Connect to a mobile hotspot

Enable the mobile hotspot feature on your smartphone and connect your computer to this new cellular network.

3
Run the SMTP test again

Execute your SMTP connection test using smtp.office365.com on port 587 with TLS. Check if the connection still returns a diagnostic error after the QUIT command.

Test the SMTP Connection on an Alternative Network
Network Isolation Successful: If the error disappears on the mobile hotspot, you will need to contact your local ISP or IT administrator to adjust your primary network's firewall settings.
Free Microsoft Office alternative

Looking for a Reliable and Free Office Suite?

While resolving complex Microsoft 365 backend and Exchange issues, you shouldn't have to pause your daily productivity. WPS Office offers a free, lightweight, and highly compatible alternative for all your document, spreadsheet, and presentation needs.

  1. 1. Visit the official website: Go to the official WPS Office website to access the latest secure download.
  2. 2. Download the installer: Click the 'Free Download' button to get the lightweight installation package for your operating system.
  3. 3. Install and start working: Run the installer and open WPS Office to immediately start editing your existing Microsoft Office documents.
Completely free and lightweight office suiteSeamless compatibility with Microsoft Word, Excel, and PowerPoint formatsFamiliar user interface requiring zero learning curveIntegrated AI tools to boost your daily workflow
microsoft office alternative - wps office

Frequently Asked Questions

Why does Microsoft 365 SMTP use port 587?

Port 587 is the standard port for authenticated SMTP client submission. It is required by Microsoft 365 to ensure that emails are transmitted securely using STARTTLS encryption.

What is the purpose of the QUIT command in an SMTP session?

The QUIT command is sent by the client to inform the SMTP server that it has finished sending instructions. The server responds and then gracefully closes the transmission channel.

Can outdated TLS settings cause SMTP connection drops?

Yes. Microsoft 365 enforces the use of TLS 1.2 or higher for all connections. If your application or operating system defaults to older TLS versions, the connection may fail or drop unexpectedly during the session.