If you're getting this error after clicking "test SMTP settings":
Sending test email to '******'...
**ERROR sending email**:
5.2.252 STOREDRV.Submission.Exception: SendAsDeniedException.MapiExceptionSendAsDenied;
Failed to process message due to a permanent exception with message
Cannot submit message
This error is thrown by your SMTP server. Your SMTP server does not allow custom "from" addresses. Please either set the "from" to the value allowed or use our built-in SMTP server supplied by the SaaS helpdesk version.
Sometimes SMTP servers deny custom "from" names too. Under "Admin - Email" try enabling this setting: "Use 'From Name' for ALL outgoing notifications"
If you're getting this error:
535: 5.7.3 Authentication unsuccessful [XXX.prod.outlook.com 2021-01-09T17:10:40.728Z XXX]
MailKit.Security.AuthenticationException: 535: 5.7.3 Authentication unsuccessful
when using O365 via oAuth-authentication.
Make sure you enable "smtp-auth" for that account: https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission#enable-smtp-auth-for-specific-mailboxes