Hi Antoine,
O365 will only allow you to relay email as the registered Accepted Domains only.(Else you might be blacklisting their IPs)
i.e. the sender on the application should be
*@ourenterprise.com and not 1234@microsoft.com
SMTP Relay Any email address (including non-Office365 mailboxes) can send mail using an SMTP relay, as long as
it uses a domain thats set up as yours in Office 365.
So if you own @ourenterpriseToo.com, then get it added to the O365 account. Post which it would allow you to relay as that domain as it would be verified and accepted domain for your Office 365 tenant. Else use your on-premises server (But using a domain
that you don't own, isn't a very good idea)
TIP: If you have an on-premises SMTP server for example if youre operating in a Hybrid environment then its recommended to use the on-premises server to handle email delivery for applications and devices.
Refer to the below article to find out exact steps required to setup the relay to see if you have missed anything:
How to Allow a Multi-function Device or Application to Send E-mail through Office 365 Using SMTP