Make sure you use an editor capable of saving the template file as UTF8 without BOM (notepad++, textpad etc. are good).
The sendmail script needs to use binary when reading the template, so: uFromFile(fullFileName ,-1,true);
Then the content type used in the sendSMTPmessage function should be "text/html;charset=UTF-8"
And as Steffi suggest, you could also try a simple HTML version as template:
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
</head>
<body>
<p>Something happened</p>
</body>
</html>
I can't see why you'd need to use windows-1251, but you can certainly try replacing UTF-8 with that as well in the HTML charset setting & content type for the sendmail function.
Br,
Chris