Tony close email function for query