fixed to send email correctly