Fix Microsoft 365 SMTP 550 5.7.64 Relay Access Denied
Question details
An accounts receivable application needs to send email through Microsoft 365 without SMTP relay errors.

- Product
- Microsoft 365 Exchange Online
- Device & OS
- not provided
- Scenario
- An accounts receivable application sends SMTP mail through Office 365.
- Observed behavior
- The application receives 550 5.7.64 TenantAttribution; Relay Access Denied and 503 5.5.2 Sender already specified. Adding its external IP address to connection filtering and SPF did not resolve the issue.
Collect the application's SMTP server, port, envelope sender address, and actual outbound public IP address. Have an Exchange Online administrator review the connector settings and obtain the SMTP error details.
Check the Microsoft 365 SMTP relay connector
Use this approach when the application sends through Exchange Online using a connector and a public IP address or certificate.
SMTP relay can be used without a hybrid deployment. Adding an IP address to connection filtering or SPF does not create or configure a relay connector.
In the application's SMTP settings, confirm that the server is the Microsoft 365 MX endpoint for your domain, typically ending in mail.protection.outlook.com, and that it uses port 25.
In the Exchange admin center, open Mail flow > Connectors. Find an enabled connector from your organization's email server to Microsoft 365 and review its identification method and scope.
In the connector settings, confirm that the configured static public IP matches the application's actual outbound IP after any firewall or NAT. If the connector identifies the sender by certificate, check that the application presents the configured certificate.
In the Exchange admin center, open Mail flow > Accepted domains and verify that the envelope sender uses a domain accepted by your tenant. Also check the recipient domain and connector restrictions for the intended message.
Send a new test message from the application's email settings. If it fails, compare the SMTP response, outbound IP, sender address, and timestamp with the connector configuration.

Review the SMTP session after a 503 sender error
Use this check if the application also reports 503 5.5.2 Sender already specified.
Use WPS Office for accounts receivable documents
WPS Office is a free, lightweight alternative for working with office documents. Its familiar interface and Microsoft Office format compatibility make it easier to move existing files, though it does not repair Microsoft 365 SMTP relay settings.

Frequently Asked Questions
Why didn't adding the IP address to SPF fix the relay error?
SPF helps recipient servers evaluate authorized senders; it does not configure the Exchange Online relay connector. Check Mail flow > Connectors in the Exchange admin center and confirm the connector recognizes the application's outbound IP or certificate.
Do I need a hybrid Exchange deployment to use Microsoft 365 SMTP relay?
No. An application can use a Microsoft 365 SMTP relay connector without a hybrid deployment, provided its connection and sender meet the connector and tenant requirements.
Which SMTP server and port should a relay connector use?
Configure the application to use your domain's Microsoft 365 MX endpoint, typically ending in mail.protection.outlook.com, on port 25. Check your domain's MX record and ensure outbound port 25 is available.
What does 503 5.5.2 Sender already specified mean?
It can indicate that the application issued another MAIL FROM command before finishing or resetting the current SMTP transaction. Review the application's SMTP log and retry with a fresh connection.




