This is how to send emails from an app or device not named Outlook through the Microsoft 365 network. According to Mail Flow Best Practices, there are 3 options available.
- SMTP Auth
- Direct Send
- SMTP relay
SMTP Auth
If you can deal with Modern Authentication in the form of OAuth, this option provides you with the most reliable email delivery. And you do need a licensed mailbox to send emails from.
Server/smart host | smtp.office365.com |
Port | Port 587 (recommended) or port 25 |
TLS/StartTLS | Enabled |
Username/email address and password | Enter the sign-in credentials of the hosted mailbox being used |
Direct Send
Direct Send doesn’t require SMTP Auth, nor a licensed mailbox. All you need is to specify your own MX endpoint as the mail server or smart host with an unblocked Port 25, you are all set to send emails to recipients in your own organization. Adding an SPF record to avoid having the message flagged as spam is recommended but not required.
v=spf1 ip4: include:spf.protection.outlook.com ~all
Server/smart host | Your MX endpoint, for example, contoso-com.mail.protection.outlook.com |
Port | Port 25 |
TLS/StartTLS | Optional |
Email address | Any email address for one of your Microsoft 365 or Office 365 accepted domains. This email address doesn’t need to have a mailbox. |
SMTP Relay
If you need to send emails to external recipients, or not every device on your network has Port 25 open or allowed, SMTP Replay could be your answer. The basic setup is the same as the Direct Send but you do need to set up a Mail Flow connector first, whether it’s certificate-based or IP-based.
Obviously, an IP-based connector is much easier.
Connector setting | Value |
---|---|
From | Your organization’s email server |
To | Microsoft 365 or Office 365 |
Domain restrictions: IP address/range | Your on-premises IP address or address range that the device or application will use to connect to Microsoft 365 or Office 365 |
Device or application setting | Value |
---|---|
Server/smart host | Your MX endpoint, for example, yourdomain– com.mail.protection.outlook.com |
Port | Port 25 |
TLS/StartTLS | Enabled |
Email address | Any email address in one of your Microsoft 365- or Office 365-verified domains. This email address doesn’t need a mailbox. |
And again, SPF is highly recommended to avoid your messages being trapped in the spam folder.