Objective

We have a printer here which can send email via SMTP. However, Office 365 is quite finnicky on the configuration.

This article is extracted from How to set up a multifunction device or application to send email using Microsoft 365 or Office 365 | Microsoft Docs

What do we need?

We’ll need FIXED-IP for on-prem devices

Email address

We’ll need email address for the sender. However, we do not need to get mailbox for this user.

In our example, we are using [email protected]

MX Record

  1. Login to Microsoft 365 admin center
  2. Go to Settings > Domains, select your domain (for example, contoso.com), and find the MX record

Note down this MX Record, we’ll need this to configure SMTP server

Connector

  1. Go to Exchange admin center > Mail Flow > Connectors
  2. Add a connector
  3. From Your Organization’s email server to Office 365
  4. Name is not really config-breaking. We can put easily identifiable name and write some description for notes.
  5. Next. we’ll use verify IP address. This is the reason why we’ll need fixed IP address

Update SPF record

  1. Go to your domain registrar’s control panel (e.g. cpanel)
  2. Edit SPF record (TXT type) to include on-prem IP address to something like the following
v=spf1 ip4:10.5.4.3 include:spf.protection.outlook.com -all

Device Config

On the device (e.g. printer), here are the configuration

KeyValue
ServerMX record obtained from section above
Port25
StartTLSEnabled
Email addressThe email address prepared on section above

Remember to open TCP Port 25 outgoing in your firewall

You may need to turn on latest TLS (i.e. TLS 1.2) and HASH standard (SHA256)

Last modified: 17 March 2022