add mail function for new users and events