lease-hostname lease script variable not working

Well…

  • you’re still using “:put” - again, that writes to the console
  • if you want this in the e-mail, then you’ll have to put it in the e-mail body - if by any chance you have not placed the “:local” declaration before sending the e-mail, well, of course that will fail: the variables don’t exist yet. Place the declarations before their usage do before the line where you send the e-mail
  • it’s often wise to debug things in steps - before sending it in an e-mail I would simply log it by replacing “:put” with “:log info” to ensure that getting the pool data actually works and then put it into the e-mail
  • are you receiving the e-mail at all? (with or without the additional content)