To get environment variables in your template, you should use some scripts to access Jenkins API.
In Jenkins there are two most popular options that I know: Groovy templates and Jelly templates.
Some more info you can find on Email-ext plugin page.
I have the same problem here: Access custom environment variables in jelly template, but I was able to get access to build parameters.
Here is a template how to do that with Jelly:
<?jelly escape-by-default='true'?>
<!DOCTYPE html [
<!ENTITY nbsp "&#38;nbsp;">
]>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<head>
<style>
body table, td, th, p, h1, h2 {
margin:0;
font:normal normal 100% Georgia, Serif;
background-color: #ffffff;
}
</style>
</head>
<body>
<j:set var="buildEnv" value="${build.getEnvironment(listener)}" />
<j:set var="myVar" value="${buildEnv.get('MY_BUILD_PARAMETER')}" />
<table>
<tr>
<td>Variable</td>
<td>
<p>${myVar}</p>
</td>
</tr>
</table>
</div>
</body>
</j:jelly>
So, you just need add some jelly tags, and to get build parameters value in this templates you need call getEnvironment method from build object.
<j:set var="buildEnv" value="${build.getEnvironment(listener)}" />
<j:set var="myVar" value="${buildEnv.get('MY_BUILD_PARAMETER')}" />