Hi,
how can set my mail send for the log is not in attach file but directly in the text email?
log file in email directly
Hi,
you don't write what "log" exactly means in your context. I assume it's a text file and the incoming job of the "Mail send" flow element. In that case you could use a script expression within the Email text property which makes use of the File class and which reads the contents of the log file and returns it as a String object. This of course makes the use of PowerSwitch necessary.
Regards,
Robert
you don't write what "log" exactly means in your context. I assume it's a text file and the incoming job of the "Mail send" flow element. In that case you could use a script expression within the Email text property which makes use of the File class and which reads the contents of the log file and returns it as a String object. This of course makes the use of PowerSwitch necessary.
Regards,
Robert
Hi Ken,
a quick and dirty solution would be:
var logFile = new File( job.getPath() );
logFile.open( File.ReadOnly );
var contents = logFile.read();
logFile.close();
contents
Paste these five lines of code into the "Script expression" type property editor of the "Message text" property of your "Mail send" flow element.
Regards,
Robert
a quick and dirty solution would be:
var logFile = new File( job.getPath() );
logFile.open( File.ReadOnly );
var contents = logFile.read();
logFile.close();
contents
Paste these five lines of code into the "Script expression" type property editor of the "Message text" property of your "Mail send" flow element.
Regards,
Robert