I have HTML code in a file and read that file in a script CCC_Header() when i call that is mail template it does not print what was expected.
My script :
Imports System.IO
Public Function CCC_Header() As String
Dim Filepath As String= "C:/Header.html"
Dim Content As String = File.ReadAllText(Filepath)
Return Content
End Function
Call in mail Template:
$Script(CCC_Header):HTML$
Dear $FK(UID_PersonOrdered).FirstName$ $FK(UID_PersonOrdered).LastName$,
HTML code
"<style>
.container {
position: relative;
text-align: center;
color: Yellow;
}
.bottom-right {
position: absolute;
bottom: 8px;
right: 16px;
}
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
<body>
<div class="container">
<img src="c:/Clor.png" alt="Snow" style="width:100%;">
<div class="bottom-right"><h1 style="font-size:4em; "><a href="">https://example.com" style="text-decoration:none">IAM</a></h1></div>
<div class="centered"><h1 ><a href="">https://example.com" style="text-decoration:none">IAM</a><h1></div>
</div>
</body>
"
Output :
Dear Rakesh