fix function sendMail