fixed bug to send email