The SMTP server for Microsoft 365 is smtp.office365.com
.
If Zammad can’t reach the host, the port might be blocked outgoing.
Also, note that Microsoft expects XOAUTH authentication and does no longer allow basic authentication. This is not supported by the notification channel and might stop working without warning.