fix send email crash