How to Find the SMTP Gateway for a Microsoft 365 Connector
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.

- 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.
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.
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.
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).
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.
Go to the Exchange Admin Center (EAC), click on 'Mail flow' in the left-hand navigation menu, and select 'Connectors'.
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.
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.

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.

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.




