fix bug in send_email()