Exchange Connection Problems

Fix Office 365 SMTP Relay SendAsDeniedException Errors

Muhammad TalhaMuhammad Talha Nov 22, 2026 868 views

Question details

Resolve a SendAsDeniedException when an on-premises IIS SMTP relay sends mail between users in the same Office 365 domain.

Fix Office 365 SMTP Relay SendAsDeniedException Errors
Product
Exchange Online and IIS SMTP relay
Device & OS
Windows server; version not provided
Scenario
An on-premises IIS SMTP server relays messages for users in an Office 365 domain.
Observed behavior
Messages reach external recipients, but some messages to recipients in the same Office 365 domain fail with error 554 5.2.0 SendAsDeniedException.
Before you start

Collect the full non-delivery report, including the sender, recipient, timestamp, and diagnostic details. Identify the relay's public IP address and whether IIS uses an Exchange Online connector or an authenticated SMTP account.

Solution 1Recommended

Check the Exchange Online relay connector

Use this check to verify that Exchange Online recognizes the on-premises server and its relay connection.

1
Inspect the relay settings

On the IIS SMTP server, open IIS 6.0 Manager and inspect the SMTP virtual server's Delivery and Outbound Security settings. Record the smart host, port, and authentication method.

2
Review the connector

In the Exchange admin center, go to Mail flow > Connectors and open the connector from your organization's email server to Microsoft 365. Confirm that its certificate or public IP identification matches the relay.

3
Check the sender domain

In the Exchange admin center, go to Mail flow > Accepted domains and confirm that the sender's domain is present and verified. Compare the address used in the failed message with the relay configuration.

4
Trace a test message

Send a new message through IIS to an affected internal recipient, then open Mail flow > Message trace in the Exchange admin center. Search by sender, recipient, and time, and review the failure details.

Check the Exchange Online relay connector
Connector identification: A matching connector identifies the sending server; it does not by itself grant every mailbox Send As permission. Check the full diagnostic error and the sender's authorization as well.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for working with Office documents. Its familiar interface and support for common Microsoft Office formats make it easier to move existing files into your workflow. It does not repair Exchange Online SMTP relay settings.

Create and edit documents with a familiar interfaceOpen and save common Microsoft Office formats, including DOCX, XLSX, and PPTXReview relay configuration notes and troubleshooting spreadsheetsUse a lightweight office suite for everyday work
microsoft office alternative - wps office

Frequently Asked Questions

Why can the relay send externally but fail for internal recipients?

External delivery does not prove that internal recipient resolution, sender authorization, or accepted-domain routing is correct. Check the full non-delivery report and use Exchange admin center > Mail flow > Message trace to investigate the failed message.

Should I change the accepted domain to Internal Relay?

Only if some recipients for that domain are hosted outside Exchange Online and an appropriate onward route is configured. Check the current setting under Exchange admin center > Mail flow > Accepted domains; switching the domain type alone may not resolve a Send As error.

Where do I check Send As permissions?

In the Exchange admin center, go to Recipients > Mailboxes, select the mailbox used in the From address, and review its mailbox delegation settings. If an authenticated account sends as that mailbox, grant Send As only where appropriate.

How do I confirm that Exchange Online recognizes my IIS relay?

In Exchange admin center > Mail flow > Connectors, inspect the connector from your organization's email server to Microsoft 365. Compare its configured public IP address or certificate identification with the connection made by the relay.