Thank you for connecting with us in Microsoft community.
Based on your description, you seem to be using Option 3.
Do you have to send emails to external recipients? If not, it is recommended that you choose option 2 for easier implementation.
You can refer to this link for details:https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365?source=recommendations#option-2-send-mail-directly-from-your-printer-or-application-to-microsoft-365-or-office-365-direct-send
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.