updated mail query