Automated personal reports not send by mail



I´m currently facing a problem with automated scheduled reports. Unfortunately they are not send anymore by piwik, though sending them manually by mail with clicking the button works flawless. It looks like the jobs are not processed or picked up by piwik. Is there any way to debug this or does anybody already know what could happen here?

Version is Matomo 3.7.0

Greetings and thanks in advance,

(Lukas Winkler) #2


This is the most often reported bug that noone on the Matomo team can reproduce.
If your cronjob is running properly and you are seeing no other bugs, then I guess this is the reason:

When you click on send now the code get’s executed by php-fpm or php-apache. But the automated reports are sent by the cronjob which calls php-cli. On most systems php-cli has a different php.ini file and I think that in your case sending emails is only properly configued properly in the php.ini read by the webserver php, but not in the one read by php-cli.

To help test out this idea the next Matomo release will contain a console function to send a testmail from the commandline.



Thanks for your reply. The core:archive cronjob is running and not reporting any errors.

php /var/www/piwik/console core:archive --url=http://xyz > /var/log/piwik_archive.log

So next I will have a look into php.ini for cli. Thanks so far.




I checked php.ini and adapted the sendmail path by adding parameters but unfortunately that did not help.

sendmail_path = /usr/sbin/sendmail -t -i

Though creating a small php script using the php mail function and then executing trough shell with php mailtest.php works and I received a mail. So it seems that it is not a php-cli fault. Also using sendmail directly from shell without php context works.

Do you have another idea?