fix mailer poor performance and take out console.log