updated mail query for all pages