Fixed mailer javascript