optimize the email send module