Troubleshoot CDOSYS SMTP Ports 587 and 25 in Office 365
Question details
Determine why CDOSYS email traffic reaches port 25 when the application specifies port 587 or 465.

- Product
- CDOSYS and Microsoft Office 365 SMTP
- Device & OS
- not provided
- Scenario
- An application uses CDOSYS to send email through an SMTP server, and its outbound connection port needs to be verified.
- Observed behavior
- SMTP traffic is observed on port 25 despite an application setting for port 587 or 465.
Identify the configured SMTP hostname and port, and determine where port 25 is being observed. Gather the relevant CDOSYS configuration and connection logs so you can compare the application's destination with any relay or firewall logs.
Verify the CDOSYS SMTP Server and Port Settings
Use this check to confirm that the application applies the intended SMTP settings before sending.
For Exchange Online client SMTP submission, the usual endpoint is smtp.office365.com on port 587 with STARTTLS. Port 25 may be used for specific relay scenarios; port 465 is not the standard Exchange Online client submission port.
Open the application's CDOSYS configuration code and check the smtpserver and smtpserverport fields. For Exchange Online client submission, set smtpserver to smtp.office365.com and smtpserverport to 587.
In the same configuration, verify that sendusing is set to 2 for network SMTP and that the updated configuration is applied to the message before the Send action. Check for later code or configuration files that replace these values.
Review the application's TLS and authentication settings against the mail server's requirements. Exchange Online client submission requires STARTTLS and TLS 1.2 or later; confirm that the CDOSYS environment supports the required TLS and authentication method.
Send a test message from the application and compare its configured SMTP destination with the source, destination, and port in the connection or firewall logs.

Check Firewall Rules and SMTP Relays
Use this approach if the application is configured for port 587 but logs still show port 25.
Work With Office Files Using WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office files. Its format compatibility helps you move documents, spreadsheets, and presentations between suites. It does not fix CDOSYS or Exchange SMTP connections.

Frequently Asked Questions
Which SMTP port should I use for Exchange Online client submission?
Use smtp.office365.com on port 587 with STARTTLS for client SMTP submission. Confirm that the application also meets Exchange Online's current TLS and authentication requirements.
Why do firewall logs show port 25 when CDOSYS is set to 587?
Check whether the log entry comes from the application host or a separate SMTP relay. Also inspect the CDOSYS configuration, SMTP proxy, NAT, and port-redirection rules for a different destination or overridden setting.
Does blocking port 587 make CDOSYS automatically use port 25?
A firewall block alone does not change the destination port. Check application fallback settings and network redirection rules, then compare logs from the application host and any mail relay.
Can I use port 465 for Exchange Online SMTP client submission?
Port 465 is not the standard Exchange Online client submission port. Use smtp.office365.com on port 587 with STARTTLS, provided the client supports the required TLS and authentication.
What if CDOSYS cannot meet Exchange Online authentication requirements?
Review Microsoft's current SMTP AUTH requirements and the application's authentication capabilities. If CDOSYS cannot use the required method, consider a supported mail-sending client or another approved sending approach.




