Bug in sendMail function is fixed.