fix mailer javascript