First of all you need to install Mageplaza Extension , you can find it here
after you create O365 SMTP connector that you may use as smtp server to allow sending out emails as group
you need to override this class
change value of None from '' into 'smtp'.
then go to the configuration and choose None and click on Save
that's it :)