Hi @Primož Cerar ,
Glad you are able to resolve the issue and thanks for sharing the solution with us.
I agreed that security is concern with SMTP authentication which require to disable security defaults due to basic authentication.
The workaround is to use the app password for your basic authentication.
Please refer the blog to use SMTP with security default enabled: https://j0rt3g4.medium.com/how-to-send-emails-using-office-365-smtp-auth-help-part-2-smtp-auth-with-mfa-opc2-52ed3ca4fa5e
If you still have any feedback, I suggest you post this idea at the Azure Feedback Portal, which is monitored by the product team for feature enhancements.
Hope this will help.
Thanks,
Shweta
----------------------------------------------------------
Please remember to "Accept Answer" if answer helped you.