canged API of sendMail