Exchange Connection Problems

How to Find the SMTP Gateway for a Microsoft 365 Connector

Ayan MasoodAyan Masood Oct 26, 2026 869 views

Question details

The user needs to locate the SMTP gateway address and properly configure a Microsoft 365 connector to allow a hardware device to send email notifications.

How to Find the SMTP Gateway for a Microsoft 365 Connector
Product
Microsoft 365 Exchange Online
Device & OS
not provided
Scenario
Setting up a multifunction device or phone system to send voicemail notifications via email using Microsoft 365 direct send and an SMTP connector.
Observed behavior
The SMTP connection test fails because the specific public IP address of the sending device was omitted from the connector settings, and the gateway hostname was unclear.
Before you start

Ensure you have Exchange Administrator permissions in Microsoft 365 and know the exact external public IP address of the network where your sending device is located.

Solution 1Recommended

Configure Direct Send Using the Domain MX Record

Use the direct send mail-flow method by pointing your device to the Microsoft 365 MX record and explicitly whitelisting the device's public IP address in the Exchange Admin Center.

When setting up a multifunction device or application to send emails to internal users, the recommended approach is 'Direct Send'. This requires using your Microsoft 365 MX record as the SMTP gateway instead of a standard IP address, and verifying the sender via an Exchange connector.

1
Locate your MX Record

Log in to the Microsoft 365 Admin Center, navigate to Settings > Domains, select your primary domain, and copy the MX record value (e.g., yourdomain-com.mail.protection.outlook.com).

2
Update Device Settings

Access your device's network or email configuration panel. Paste the copied MX record into the 'SMTP Server Gateway' or 'Host Name' field. Ensure the port is set to 25.

3
Access Exchange Admin Center

Go to the Exchange Admin Center (EAC), click on 'Mail flow' in the left-hand navigation menu, and select 'Connectors'.

4
Modify or Create the Connector

Select your existing connector (or create a new one from your organization's email server to Microsoft 365). Proceed to the 'Authenticating sent email' section.

5
Add the Device IP Address

Choose the option to verify the sender's IP address. Add the specific external public IP address of the actual sending device. Do not just use a broad organization network range if the device IP routes differently. Save the connector.

Configure Direct Send Using the Domain MX Record
Wait for Propagation: After saving the connector in Exchange Online, please allow up to 30 minutes for the routing changes to fully propagate before running the device's SMTP connection test again.
Free Microsoft Office alternative

Looking for a Lightweight Office Suite? Try WPS Office

While WPS Office does not handle backend Exchange server configurations, it is an excellent choice for businesses looking for a free, fully-featured alternative to Microsoft Office desktop apps. Enjoy seamless productivity without the heavy subscription costs.

Fully compatible with Microsoft Office formats including DOCX, XLSX, and PPTXLightweight installation with fast document loading timesFamiliar, easy-to-use tabbed user interface for quick onboardingFree to use, making it a highly cost-effective solution for teams
microsoft office alternative - wps office

Frequently Asked Questions

What port should I use for Microsoft 365 Direct Send?

Direct send requires using port 25. You must ensure that your internet service provider (ISP) or local firewall does not block outbound traffic on port 25, otherwise the SMTP connection will fail.

Can I use an IP address instead of an MX record for the SMTP gateway?

Microsoft highly discourages using static IP addresses for the SMTP gateway because Microsoft 365 IP ranges change frequently. Always use the MX record hostname (e.g., contoso-com.mail.protection.outlook.com) to ensure a stable connection.

Why is my device failing the SMTP connection test even after adding its IP to the connector?

Ensure you are using the correct external public IP address assigned to the device by your network edge router, not its internal local IP (like 192.168.x.x). Additionally, it can take up to 30 minutes for newly saved Exchange connector settings to take effect.

Does the Direct Send method allow emailing external addresses?

No. The Direct Send method only allows the device to send emails to recipients within your own Microsoft 365 organization. If you need to send emails to external addresses (like Gmail or Yahoo), you must use SMTP AUTH client submission instead.