Looking for a self hosted email server that supports notification via webhook - eviltoast

Hi guys. I’m trying to automate some of my workflow but unfortunately some old school services still use email for verification code. I’m looking for a self hosted email server that I can use to receive these verification emails, and notify a webhook when a new email arrives. Any suggestion? Thanks!

-–

I know I can use IMAP to get emails from, e.g., Gmail, but in my experiment it always has some unpredictable latency and not always reliable.