I have also tried the command:
Code: Select all
su -c "/opt/otrs/bin/otrs.Console.pl Maint::Stats::Generate --number 10010 --params CustomerID=001 --mail-recipient customer_email@here --mail-sender '<mycompanyemail@here>' --mail-body 'Your monthly report arrived' --format Print" -s /bin/bash otrs
Also, I have configured the #10010 report to use CustomerID as a filter key when generating reports, and the checkbox 'Do not allow changes to this element when the statistic is generated. ' is not selected.
The idea behind this is to generate a report of all opened tickets (by/for specific customers), monthly, and send that to these customers, individually.
The command shown above will be run by a cron job, which iterates for all customers in my OTRS system, generates the report for every customer and finally send the email.
I do not know if exists another solution that best fits to execute this task. My problem with the partially solution exposed above is within generating the report for every customer, where I cannot send the "CustomerID" to the command that generates the report customized to a specific customerID.
Thanks!