How to put the variable "user" in this array. The way it is not it doesn't work sadly. The $user variable should be john.smith for example.
I have the following output:
curl --header "Authorization: Bearer XXXXXXXX" --request POST --data '["$email@example.com"]' "https://mattermost.test.com/api/v4/teams/$team/invite/email"