How to read resource file as html template for e-mail?

Hello to all,


I need to keep html file as a template for sending e-mails. 

I try to save it as a resource, but i do not understand how to read file from resource to variable? 



Hey Andrey,

You can fetch the binary data from the resource and then convert that into text.

Then you can run your templating to fill in the variables and what not you wish to do with the template.

Joey Moree wrote:

Hey Andrey,

You can fetch the binary data from the resource and then convert that into text.

Then you can run your templating to fill in the variables and what not you wish to do with the template.

Hello Joey, 

Thanks for the answer, but could you show example how to read binary data from resources? 



Hi Andrey,

For example, to send an email with HTML stored in a resource file you need to create an Email widget and insert an expression in the email with the value BinaryDataToText(Resources.Yourfile.Content). Make sure that the expression is with the escape content set to No.

I attached an .oml file as an example.


Best Regards!