I am trying to read a text file into a variable, then output the variable in the email body as HTML.
%var%
But i found that it always print everything into one line, even though the text file content has several lines. Is there anything i can do to have proper formmating? Thanks
Yes, i tried using message box, it works fine. What i am trying to do is: - Run .exe, output result to a text file - Read text file into a variable - Send Email with HTML formmatted message, in the body of the email, i'll use the variable like this:
HTML doesn’t respect newlines, it ignores all whitespace.
To work around the problem, replace all the newlines with BRs. An easy way to do this is to put the following JScript into the BeforeAction event of the Send Email action:
VAR=VAR.replace(/\n/g,‘BRTag’);
(BRTag should be a BR html tag. The forum software has a bug which currently won’t let us escape < and > properly. Should be fixed soon, though.)