Regarding Exchange online, I was intriguied to see how mail has been sent from any other systems.
So, imagine that you are a developer and you have to integrate and implement function with a exchange online mailbox.
Here is my breif solutions.
First of all, you need to configure NoReply Mailbox from the Exchange online. Let me skip the procedure and replace the explanation with the following link.
https://www.codetwo.com/admins-blog/no-reply-mailbox-in-microsoft-365/
And you need to enable SMTP Authentication for the shared mailbox.
Please refer the MS Documentation which is how to set up this feature globally or for each mailbox.
For example:
After enable SMTP Authentication for the mailbox,
You are almost there. Make your own code for a sending message through using O365 SMTP server.
Please take a look at my code from the following github URL.
https://github.com/leeyosebi/SendEmailO365Java
You might struggle for the import java mail package which is required for send a email.
There are several ways to import a required modules and packages but I just download the .jar files and import manually.
Now, You can import required module.
It successfully works. Let's find the message logs on the EXO first.