"invalid syntax, variables are not supported" error when adding mail server in Lucee admin

Then you have something set up to not show any detailed error messages. Another place to look for those errors is Lucees application.log file. See this post, it might help you: