After the run of a job chain, the order log should be sent as an attachment of an email instead to receive a mail per job that has been executed during the job chain.
You can achieve this by adding a step with an sendEmail-Job at the end of the job chain. See the example below.
How it works
The JITL-Job JobSchedulerManagedMailJob is used to send the email. The parameter attachment will be set by the post processing script. The postprocessing set the name of file using the api method spooler.log_dir, the order_id and the job chain name provided by the order object. The name of the order log has the format $log_dir/order.<job_chain_path>.<order_id>.log where the job chain path have , instead of /.
In this example, the order log will be sent in case of a succesfull execution of the job chain.