Troubleshoot Classic ASP Email Sending Through Office 365 SMTP
Question details
Determine why a Classic ASP application cannot send email through Office 365 SMTP after working with an internal Exchange server.

- Product
- Exchange Online SMTP client submission and Classic ASP CDO
- Device & OS
- not provided
- Scenario
- The developer is migrating mail sending from an internal Exchange server to hosted Exchange and wants to retire the internal server.
- Observed behavior
- Email sending fails through Office 365 on ports 25 and 587 despite valid credentials and an SSL setting.
Collect the exact CDO error message and confirm the sending mailbox and SMTP server settings without sharing passwords. Run connectivity checks from the server hosting the ASP application, not just from a separate workstation.
Check Exchange Online SMTP Submission and CDO Settings
Use these checks to isolate connectivity, authentication, TLS, or CDO configuration issues.
On the ASP host, run `Test-NetConnection smtp.office365.com -Port 587` in PowerShell. If the TCP test fails, check outbound firewall and network rules; a successful test does not verify TLS or authentication.
In the ASP code, inspect the CDO configuration fields: use `smtp.office365.com` as `smtpserver`, `587` as `smtpserverport`, authenticated submission via `smtpauthenticate`, and `smtpusessl` set to true. Confirm the mailbox credentials and avoid writing them to logs.
In the Microsoft 365 admin center, open the sending user and check Mail > Manage email apps for Authenticated SMTP. Also check organization-wide SMTP AUTH and authentication policies in the Exchange admin center or Exchange Online PowerShell; a mailbox setting alone may not override a blocking policy.
Confirm that the host can negotiate TLS 1.2 or later using STARTTLS on port 587. Review the current Exchange Online SMTP AUTH requirements and compare them with the authentication and TLS capabilities of the CDO implementation.
Capture the CDO error number and description at the `.Send` call, then compare it with server, TLS, or authentication logs. Use the result to identify whether the failure occurs during connection, TLS negotiation, sign-in, or message submission.

Replace Legacy CDO Sending With a Supported Mail Service
Use this approach if CDO cannot meet Exchange Online TLS or authentication requirements.
Work With Office Email Attachments in WPS Office
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format compatibility make it easy to move existing files into your workflow. It does not fix Exchange Online SMTP or Classic ASP sending issues.

Frequently Asked Questions
Which server and port should Classic ASP use for Exchange Online SMTP submission?
Use `smtp.office365.com` on port 587 with authenticated SMTP submission and STARTTLS. Confirm that the CDO implementation and host support the required TLS and authentication.
Does a successful PowerShell connection test mean the mailbox credentials work?
No. `Test-NetConnection smtp.office365.com -Port 587` checks TCP connectivity, not TLS negotiation or mailbox authentication. Test those separately from the application host.
Where can I check whether SMTP AUTH is enabled for the mailbox?
In the Microsoft 365 admin center, open the user and check Mail > Manage email apps for Authenticated SMTP. Also review organization-wide settings and authentication policies, which can affect access.
Why can CDO fail even when the SMTP server is reachable?
CDO or its host may not support the required TLS or authentication method, or an Exchange Online policy may block the sign-in. Inspect the error returned at `.Send` and check the relevant authentication and TLS logs.
What can I use if Classic ASP CDO cannot authenticate?
Consider a supported mail-sending component that uses OAuth with Exchange Online, or call Microsoft Graph's `sendMail` endpoint through an appropriately authorized application. A suitable external mail service or relay may also be an option.




