Hi @ali99,
the email notification feature works on OCS v. 2.5, even if it is not yet mature and not very detailed in OCS wiki, you must (in my case Debian jessie) :
Install php-mailer :
apt-get install libphp-phpmailer
Create a scheduled task with the apache user:
crontab -u www-data -e
Add the line at the end of file :
*/1 * * * * php /usr/share/ocsinventory-reports/ocsreports/tools/cron_mailer.php
In OCSreports, go to Configuration > Notifications and set time (NOTIF_PROG_TIME) for a run in next few minutes.
To debug (if necessary) :
Add the following lines (after <?php and before require_once…) of the /usr/share/ocsinventory-reports/ocsreports/tools/cron_mailer.php file:
// log phpmailer errors
@ini_set ('log_errors', 'On');
@ini_set ('display_errors', 'Off');
@ini_set ('error_log', '/tmp/phpmailer-errors.log'); // path to server-writable log file
For details of cron_mailer.php execution status, read the /tmp/phpmailer-errors.log file, e. g. :
[26-Oct-2018 11:00:01 Europe/Berlin] Message could not be sent. Mailer Error:
[27-Oct-2018 11:00:01 Europe/Berlin] Message has been sent
[28-Oct-2018 11:00:01 Europe/Berlin] Message has been sent
Regards, Stéphane
Edit of 2018/11/09: Wrong entry in the tree in blue (folder "tools" only in lower case)