Elastick - alerting

Hello,

I have an enterprise license within elastic.
I have an O365 agent deployed that collects logs. I can view them using dashboards.
How do I please set up the logs from O365 to go through the connector to Mail? If there is any error or anomaly send mail to certain address.
What do I need to do for this and where can I possibly set this up? Any experience possibly? Everything is set in Elastic as GUI? Set anything in Entra AAD in application? or set something on the VM server where the logs go? Kibana is designed for this alerting?

Thank you for any advice

have a nice day