fully implemented email notifications