Hotspot scripts

I have two questions about hotspot scripts:

  1. Whats wrong with below script - hotspot on load?
/tool e-mail send \\\
    \n        to="xy@gmail.com" \\\
    \n        subject=("User ". $user. "signin) \\\
\n
  1. How to create script that send mac adress login failure?