I don’t think #{env:COMPUTERNAME} should work. Since the #{} system is for accessing Octopus provided variables.
Your Release link having the $env:computername in it is a parsing error. I’m guessing you are running this on the Octopus Server as a powershell script?
Doing it the other way causes it to try and solve the release link as an HTTP first… don’t do to that. If you are generating this in powershell and in a STRING having this issue then you can try this
$releaseLink = (“http://” + $env:Computername + “/…”)
And that should kick out what you are looking for.
Now, Since I looked at the the fact you are doing this in email body.
Break apart your process into two steps. The first one being a powershell script that just gathers data for you on what the ‘Project Link’ and others are going to be.
THen use the Set-OctopusVariable -Name ProjectLink -Value $fullProjectLink
On the email step, just use the #{Octopus.Action[].Output.ProjectLink}
That will properly parse the output variable from a previous octopus step.