Added function for get email and messageid