Email Intergration

Hello, I am trying to look into how to add the email integration to the pool (and exactly what it does)?

You can see reference code as many pools have Email support in their github code.
Email are used to send notifications if miner is disconnected or any other issue or payments send notifications etc.