fixed print and send email.