fixing mail endpoint