At the end of December 2026, Microsoft 365 turns off, by default, the user name and password sign-in that Database Mail uses on smtp.office365.com. Database Mail has no other documented way to sign in to Microsoft 365, so your SQL Server Agent job alerts stop arriving unless you move the server to another route. Office 365 is the former name for Microsoft 365, which is the name used throughout this guide.
What changes, and when
SMTP AUTH is the way an application signs in to an outgoing mail server. Basic authentication is its older user name and password method.
Microsoft’s Exchange Team timeline post gives these dates:
Now to December 2026: SMTP AUTH Basic Authentication behavior remains unchanged.
End of December 2026: SMTP AUTH Basic Authentication will be disabled by default for existing tenants. Administrators will still be able to enable it if needed.
New tenants created after December 2026: SMTP AUTH Basic Authentication will be unavailable by default. OAuth will be the supported authentication method.
Second half of 2027: Microsoft will announce the final removal date for SMTP AUTH Basic Authentication.
Microsoft has not said how an administrator will turn Basic authentication back on after December. It has also not published the exact refusal text that Database Mail will receive when the default changes. Do not plan around a specific Microsoft 365 setting or error message until Microsoft publishes those details.
Two security controls can block this sign-in already. When security defaults are enabled in Microsoft Entra ID, sign-ins from older protocols such as SMTP are blocked.
At firms with Microsoft 365 Business Premium, a Microsoft-managed Conditional Access policy can also block legacy authentication. Conditional Access is a set of rules that decides which sign-ins are allowed. Microsoft creates this policy in report-only mode and may enable it after at least 30 days if it remains there. We read this as another control that may need attention even if Microsoft provides a way to restore Basic authentication temporarily.
Why Database Mail is caught
Microsoft’s Configure Database Mail page lists three ways to connect to a mail server. Database Mail signs in with a user name and password, the server’s Windows account, or anonymously, and Microsoft documents no other method, including in SQL Server 2025.
OAuth is Microsoft’s current token-based sign-in method. The Database Mail account procedure has no setting for an OAuth token, tenant, application ID, or certificate. SQL Server 2025 added security improvements for the connection between Database Mail and SQL Server. Microsoft did not document an OAuth option for the connection to Microsoft 365.
This means an upgrade to SQL Server 2025 does not change the mail sign-in. The route between Database Mail and the mail service must change.
Check which servers send this way
Run this read-only query in SQL Server Management Studio against every SQL Server that sends alerts or scheduled exports:
-- Read-only. Which Database Mail accounts sign in to a mail server with a user name.
SELECT a.name AS mail_account, a.email_address, s.servername, s.port, s.enable_ssl,
s.username, s.use_default_credentials
FROM msdb.dbo.sysmail_account a
JOIN msdb.dbo.sysmail_server s ON s.account_id = a.account_id
ORDER BY a.name;
A row using smtp.office365.com with a user name identifies a sender that stops when the new default applies, unless an administrator temporarily restores the old sign-in. A row using smtp.hve.mx.microsoft or smtp-hve.office365.com is High Volume Email. That service has a different timetable.
Our test account produced this row:
| mail_account | email_address | servername | port | enable_ssl | username | use_default_credentials |
|---|---|---|---|---|---|---|
| LAB alerts | [email protected] | smtp.office365.com | 587 | 1 | [email protected] | 0 |
Tested on: SQL Server 2025 Standard Developer, version 17.0.1000.7, 14 November 2026. The test account used an example.com address and was removed afterward.
The SMTP AUTH clients report in the Exchange admin center helps you find other senders, including copiers and accounting systems that may use the same sign-in.
What a failed alert looks like
In our lab, sp_send_dbmail returned 0, which means success, even though the message never left the server. Database Mail had accepted the request into its queue. The item then sat in retrying before changing to failed.
Microsoft documents that the request goes into a queue, the procedure returns immediately, and a separate process delivers the message later. So the refusal is recorded in the msdb database, not where the request came from, and no message appears in any inbox.
Run this query to see failed messages from the last seven days:
-- Read-only. Failed Database Mail messages in the last 7 days, with the mail server's reply when there is one.
SELECT fi.mailitem_id, fi.recipients, fi.subject, fi.send_request_date, el.log_date,
CASE WHEN CHARINDEX('server response was', el.description) > 0
THEN SUBSTRING(el.description, CHARINDEX('server response was', el.description), 112)
ELSE LEFT(el.description, 140) END AS reason
FROM msdb.dbo.sysmail_faileditems fi
LEFT JOIN msdb.dbo.sysmail_event_log el ON el.mailitem_id = fi.mailitem_id
WHERE fi.send_request_date >= DATEADD(DAY, -7, GETDATE())
ORDER BY fi.send_request_date DESC, el.log_date;
Our failed test produced this result:
| mailitem_id | recipients | subject | send_request_date | log_date | reason |
|---|---|---|---|---|---|
| 1 | [email protected] | LAB test: SQL Server Agent job failed | 2026-11-14 22:11:21 | 2026-11-14 22:12:04 | server response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.3 Authentication unsuccessful |
The server’s reply was exactly 5.7.57 Client not authenticated to send mail. Error: 535 5.7.3 Authentication unsuccessful.
The surrounding .NET message said, “The SMTP server requires a secure connection”. That wording points toward TLS, but TLS had worked. The sign-in was the problem.
Microsoft may return different wording after December. Look for 535 or 5.7. in the reason instead of relying on one exact sentence. A new failure may also remain in retrying for a minute or two before it appears in the failed-items query.
Your routes for Database Mail
| Route | Recipients | Database Mail connection | Main condition |
|---|---|---|---|
| High Volume Email | Internal only | User name and password on port 587 | Billing policy required |
| Exchange Online connector | Internal and external | Anonymous on port 25 | Fixed, unshared public IP |
| Restore the old sign-in | Internal and external | Existing account | Temporary only |
| Azure Communication Services Email | Internal and external | User name and password | Retires in 2028 |
| Direct Send | Internal only | Anonymous on port 25 | Admins can now block it |
| Your own relay | Depends on the relay | Database Mail sends to that relay | IIS SMTP is unsupported |
High Volume Email for Microsoft 365. Microsoft names this service for applications that use Basic authentication and send only to people inside the same tenant. The High Volume Email settings use smtp.hve.mx.microsoft, port 587, TLS, and an HVE account. Database Mail uses the password option, which Microsoft supports until September 2028. The price is $42 per one million delivered recipients, billed through Microsoft 365 pay-as-you-go to an Azure subscription. Without an assigned billing policy, the account does not send.
SMTP relay through an Exchange Online connector. Microsoft’s SMTP relay instructions allow internal and external recipients. The server needs a static public IP address that is not shared with another organization, and outbound port 25 must be open. Database Mail sends anonymously to your Microsoft 365 MX endpoint. The server must not be hosted in Azure, and its public IP must be added to the domain’s SPF record. No Microsoft page names Database Mail for this route. We read the documented settings as a match for Database Mail’s anonymous option.
Turning the old sign-in back on. Microsoft says administrators will still be able to enable Basic authentication after the default changes, but it has not published the method. This buys time until the final removal date. It does not work while security defaults block legacy sign-ins, and it is not a permanent fix.
Azure Communication Services Email. Microsoft announced on 23 September 2026 that this service retires on 30 September 2028. Microsoft recommends using the retirement period to move existing workloads off it instead of starting new ones. It is not a route to start using now.
Direct Send. Direct Send reaches internal recipients only and uses no sign-in. On 17 November 2026 Microsoft made Reject Direct Send generally available. It is an admin setting that blocks this route, and new tenants get it turned on by default. If your admin turns it on, alerts sent this way stop. Your own relay server. Windows Server 2022 is the last version with the IIS SMTP feature, and Microsoft says IIS SMTP is unsupported for relaying mail to Microsoft 365.
Which route fits your server
For alerts that go only to your staff, start with High Volume Email. For alerts or scheduled reports that go to customers or suppliers, consider the Exchange Online connector when the server has a fixed, unshared public IP and can use outbound port 25.
A server hosted in Azure does not fit the connector route. A server without a fixed public IP does not fit it either. Those cases need a closer look at the recipients, hosting, and available mail services before you change the account.
What to do before the holidays
The last two weeks of December bring holidays and year-end close, so make the change before then.
-
Run the account query on every SQL Server.
-
List the recipients for each alert, export, and scheduled report. Mark whether each person is inside or outside your Microsoft 365 tenant.
-
Choose High Volume Email for internal recipients or assess the connector route for external recipients.
-
Change the Database Mail account to the selected endpoint and sign-in method.
-
Send a test with Database Mail’s Send Test E-Mail command or
sp_send_dbmail. Confirm that the message arrived in the expected inbox. -
Run the failed-items query one day later. Check that the test did not produce a retry or failure.
-
Add a monthly reminder to run the failed-items query. A successful job does not prove that its alert was delivered.
When to hand it over
Hand this over when you are unsure which alerts leave the company, when the server is in Azure, or when the public IP and Microsoft 365 settings are unclear. With our Fix it service, we find every sender, move it to a route that will keep working, and send a test alert you can see arrive.
Frequently asked questions
Does SQL Server Database Mail support OAuth?
Microsoft documents three Database Mail sign-in methods: a user name and password, the SQL Server service’s Windows account, and anonymous access. It documents no OAuth setting, including in SQL Server 2025. So once Microsoft 365 accepts only OAuth on smtp.office365.com, Database Mail needs a different route, such as High Volume Email or a connector.
Will Database Mail stop working with Office 365?
Database Mail itself keeps running. Accounts that use a user name and password with smtp.office365.com stop sending when Microsoft 365 disables that sign-in by default, unless an administrator restores it temporarily. Accounts using another working SMTP route are not affected by this specific change.
Can I turn SMTP AUTH back on after December 2026?
Microsoft says administrators of existing tenants will still be able to enable Basic authentication if needed. It has not said how that will be done after December. Security defaults or a Conditional Access policy may still block the sign-in, and Microsoft will announce a final removal date in the second half of 2027.
Why is Database Mail queued but not sending?
Database Mail places the message in a queue and returns before the external mail process completes delivery. A wrong password, blocked Basic authentication, network problem, or SMTP refusal can leave the item in retrying and later change it to failed. Run the failed-items query and read the reason from msdb, paying particular attention to 535 and 5.7. replies.
How we checked this: every date, setting and price on this page was checked on Microsoft Learn, the Exchange Team blog and the Microsoft 365 blog on 14 November 2026, and the timeline and the Direct Send change again on 18 November 2026. We ran the account check and one failed send on our own test server (SQL Server 2025 Standard Developer) the same day.
