Since it took me some time to figure out how to send eMail via SMTP as a shared mailbox in Office365 here some short notes how to do that. The special situation is that you first need to enable SMTP to allow sending mail. After enabling the setting even for the whole tenant or a single mailbox the user is allowed to send mail via SMTP in the name of the shared mailbox as O365 user with an assigned license.
The shared mailbox itself does not need to have a license assigned!
First of all check if SmtpClientAuthenticationDisabled
is set to false
either in the Tenant or for the user account you want to authenticate with.
You can use the cloud shell in your O365 admin panel if you want to
Connect-EXOPSSession
PS /home/superadmin> Get-TransportConfig

Now check for the specific user:
Get-CASMailbox -Identity <user with license>@domain.com
You see that SmtpClientAuthenticationDisabled
is set to True
Now enable the setting
Set-CASMailbox -Identity <user with license>@domain.com -SmtpClientAuthenticationDisabled $false
Check again:
Get-CASMailbox -Identity <user with license>@domain.com

Now you are ready to go in sending mails with host smtp.office365.com.
As you can see in the screenshots above we have enabled it on a per user setting.
There is one more special thing: You have to specify the username in the following format to send as the shared mailbox
User: <user with license>@domain.com\<name of shared mailbox>@domain.com
Password: <Password of user with license>