Hi, SPGEP
It looks like your problem is using a multi-setup multifunction device or application to send email using Microsoft 365 or Office 365.
To help you with the configuration, could you provide more information about the configuration environment?
The following links can help you get started How to set up a multifunction device or application to send emails using Microsoft 365 or Office 365 | Microsoft Learn