put in the sendemail function that sends emails notifying people about their events