Passing parameters to href attribure

Hello,

I have email template with link inside in which I want to pass parameter /url link/. When I pass the parameter to

<a href="${parameter}"> Click here! </a>

from

emailTemplates.buildFromTemplate("new-email")
  .setBodyParameter("parameter", url)
   .build(); 

it does not work. The idea is when the user receive an email with link inside, the link to redirect him to another url.

Аny suggestions how to pass url to href attribure?
Thanks