Custom HTML email template

Hi all,

i read the article How to create advanced custom HTML reports, which describes how to create a HTML report, and asked myself if it is possible to create an email template directly.

Is it possible to create or save an email template on a Flexy 205 instead of a report template?
I am currently sending the report as an attachmen or can the report, as described in the article, also be used for this purpose?

Hi Ralf,

This doc might have the information that you’re looking for. It goes over how to create a custom email through BASIC if that’s what you’re interested in.

Sending Emails with a Flexy.docx (433.3 KB)


Hi Tim,

thanks for the documentation, but I meant if it is possible to configure an HTML template as the format for the email body and not add it as an attachment.
Similar to Outlook where you can format the email body as HTML or Richtext.

Hi Ralf,

Unfortunately sending HTML data in the body of the email is not possible with the Flexy. It will only send as raw HTML code. You’ll need to send it as an attachment.


Hi Tim,

thanks for info …
Then I’ll do it like in your documentation.

Is there a way to format the tag value with leading zeroes or floating point precision?
I am tracking data within the PLC where I need some leading zeros to make it look correct in the e-mail. (using tags directly in the e-mail).

Will it always be the same amount of leading zeros needed? You could create another tag that’s a string and put the leading zeros in using a function in the BASIC IDE by writing in the number of leading zeros and then calling the actual value being read from the original tag.


I am actually using a register that is a real time clock of the PLC processor… So when it’s :00 to :09… it shows up like :9 instead of :09.

It’s just a formatting issue. Was wondering if there was a way to do it.


The only way I know of that might work for this would be somewhat of a hack. Create a string tag that’s grabbing the value of your tag that reads the time. Then you could do an if statement like if the number is less then ten then the value of the string = 0 + STR$ PLCtime@ or something similar to that. Then another statement that says if it’s 10 or greater, just have it grab the string like normal