Troubleshoot CDOSYS SMTP Port 587 and STARTTLS in Office 365
Question details
Determine why CDOSYS fails to negotiate SMTP submission over port 587 with Office 365.

- Product
- Microsoft 365 Exchange Online and CDOSYS
- Device & OS
- not provided
- Scenario
- An application uses CDOSYS to send mail through Office 365 SMTP.
- Observed behavior
- The connection works on port 25 but fails on port 587 during EHLO and STARTTLS negotiation.
Identify the SMTP host, mailbox, authentication method, and CDOSYS configuration used by the application. Confirm that outbound TCP port 587 is allowed and that the sending mailbox is licensed.
Verify SMTP connectivity, TLS, and mailbox settings
Use these checks to separate a network or mailbox configuration problem from a CDOSYS negotiation issue.
In the application's SMTP settings, use smtp.office365.com and port 587 for Microsoft 365 client submission. A successful connection on port 25 does not establish that port 587 is reachable.
From the application host, run `openssl s_client -starttls smtp -connect smtp.office365.com:587 -servername smtp.office365.com -verify_return_error -verify_hostname smtp.office365.com` if OpenSSL is available. Check the output for a successful TLS handshake and certificate verification; do not enter mailbox credentials during this test.
In the Microsoft 365 admin center, open Users > Active users, select the sending user, and check Mail > Manage email apps for Authenticated SMTP. Also verify the organization's SMTP AUTH and authentication policies, which can prevent the application from signing in.
In the application's CDOSYS and operating system configuration, verify support for TLS 1.2 or later and an authentication method currently permitted by your Exchange Online tenant. Confirm the mailbox credentials and consult current Microsoft guidance on SMTP AUTH authentication requirements.

Investigate CDOSYS negotiation or use an Exchange Online relay
Use this approach if the network and mailbox checks pass but CDOSYS still fails during EHLO or STARTTLS.
Document SMTP Troubleshooting with WPS Office
WPS Office is a free, lightweight, easy-to-use alternative for documenting troubleshooting and sharing reports. Its familiar interface and Microsoft Office format compatibility make it easy to move existing files. WPS Office does not repair CDOSYS or Exchange Online SMTP connections.

Frequently Asked Questions
Does a successful Telnet connection to port 587 prove SMTP will work?
No. Telnet can confirm that the TCP port is reachable, but it does not prove that STARTTLS, certificate validation, or mailbox authentication will succeed. Test the TLS handshake separately with an SMTP-aware tool such as OpenSSL.
Where can I check whether SMTP AUTH is enabled for the mailbox?
In the Microsoft 365 admin center, go to Users > Active users, select the user, and check Mail > Manage email apps for Authenticated SMTP. Organization-wide settings and authentication policies can also affect access.
Why can port 25 work when port 587 fails?
The ports may be subject to different firewall rules or used with different SMTP configurations. Test outbound connectivity and the STARTTLS handshake on port 587 from the application host rather than assuming port 25 success applies to both.
Can I use Microsoft 365 SMTP relay instead of client submission?
Possibly. An administrator can review Mail flow > Connectors in the Exchange admin center and configure relay if the organization meets Microsoft's requirements, including connector identification and outbound port 25 access.




