How does email notifications work