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
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
log file in email directly
Hi Robert,
my log is come to "madetoprint" element in my flow. I do not know the script expression where I can find a solution?
Regards,
Ken
my log is come to "madetoprint" element in my flow. I do not know the script expression where I can find a solution?
Regards,
Ken
log file in email directly
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
log file in email directly
Hi Robert,
Thank you very much is what I want!
Regards,
Ken
Thank you very much is what I want!
Regards,
Ken