Reports not being sent by

HI
Having a problem with Matomo not sending reports by mail, not auto sending and not sending manually using ‘Send Report Now’.
On the screen a green box appears with text “Report Sent” but no email arrives, junk/spam folder is being checked.

When Matomo was installed there are messages ;
“There are some errors in the Matomo Diagnostics System report that may prevent the plugin for working normally.
There are some issues with your system. Matomo will run, but you might experience some minor problems. See below for more information.”

In the report that followed the only item that looked like an issue is relating to the GeoIP (?)

I have tried uninstalling with the Advanced Setting ‘Delete all data on uninstall’ set to ‘Yes’

Then reinstalling, same warning messages and same symptom of not sending mail.

With WP Debug sent on and the ‘Send Report Now’ link clicked these errors are logged;
"WP DEBUG
[29-Sep-2023 09:43:45 UTC] Matomo: Changed global option mail_history: [“2023-09-29 09:43:45”,“2023-09-29 09:40:22”]
[29-Sep-2023 09:43:45 UTC] Matomo: Save settings
[29-Sep-2023 09:43:45 UTC] Matomo: Matomo error: Could not access file: �PNG

[29-Sep-2023 09:43:45 UTC] Matomo: Matomo mail failed with subject Report Sawasdee Divers Krabi - Friday, September 29, 2023: Could not access file: �PNG"

Additionally, though not coinciding with trying to generate a Matomo Report, the site has 404 error reporting and this is hit often triggering a 404 error;
‘“wp-content/plugins/matomo/app/config/global.ini.php”’
(the file does exist in that location)

Here is the Matomo Diagnostic Report for the site;
Please advise many thanks

			  # Matomo
  • Matomo Plugin Version: 4.15.1
  • Config exists and is writable.: Yes (“$abs_path/wp-content/uploads/matomo/config/config.ini.php” )
  • JS Tracker exists and is writable.: Yes (“$abs_path/wp-content/uploads/matomo/matomo.js” )
  • Plugin directories: Yes ([{“pluginsPathAbsolute”:“$abs_path/wp-content/plugins/matomo/plugins”,“webrootDirRelativeToMatomo”:“…/”}])
  • Tmp directory writable: Yes ($abs_path/wp-content/cache/matomo)
  • Matomo Version: 4.15.1
  • Matomo Blog idSite: 1
  • Matomo Install Version: 4.15.1 (Install date: 2023-09-29 16:32:00)
  • Upgrades outstanding: No
  • Upgrade in progress: No

Endpoints

  • Matomo JavaScript Tracker URL: ($site_url/wp-content/uploads/matomo/matomo.js)
  • Matomo JavaScript Tracker - WP Rest API: ($site_url/wp-json/matomo/v1/hit/)
  • Matomo HTTP Tracking API: ($site_url/wp-content/plugins/matomo/app/matomo.php)
  • Matomo HTTP Tracking API - WP Rest API: ($site_url/wp-json/matomo/v1/hit/)

Crons

  • Server time: 2023-09-29 09:33:04
  • Blog time: 2023-09-29 16:33:04 (Below dates are shown in blog timezone)
  • Sync users & sites: Next run: 2023-09-29 16:32:45 (-19s) ( Last started: Unknown. Last ended: Unknown. Interval: daily)
  • Archive: Next run: 2023-09-29 17:32:02 (58 min 58s) ( Last started: 2023-09-29 16:32:07 (-57s). Last ended: 2023-09-29 16:32:08 (-56s). Interval: hourly)
  • Update GeoIP DB: Next run: 2023-09-29 16:32:35 (-29s) ( Last started: 2023-09-29 16:33:01 (-3s). Last ended: Unknown. Interval: matomo_monthly)

Mandatory checks

  • PHP version >= 7.2.5: ok
  • PDO extension: ok
  • PDO\MYSQL extension: ok
  • MYSQLI extension: ok
  • Other required extensions: ok
  • Required functions: ok
  • Required PHP configuration (php.ini): ok
  • Directories with write access: ok
  • Directories with write access for Tag Manager: ok

Optional checks

  • 64-bit PHP Binary: ok
  • Tracker status: ok
  • Memory limit: ok
  • Time zone: ok
  • Open URL: ok
  • GD > 2.x + FreeType (graphics): ok
  • Other extensions: ok
  • Other functions: ok
  • Filesystem: ok
  • Last Successful Archiving Completion: ok
  • Database abilities: ok
  • Max Packet Size: ok
  • Warning Geolocation: warning (The default location provider determines the country visitors connect from based on their selected language. This is not very accurate, so install and use a geolocation database. )
  • Update over HTTPS: ok
  • Supports Async Archiving: No
  • Location provider ID: default
  • Location provider available: Yes
  • Location provider working: Yes
  • Matomo URL: Yes ($site_url/wp-content/plugins/matomo/app/)

Matomo Settings

  • Track mode: disabled
  • Track codeposition: footer
  • Track api endpoint: default
  • Track js endpoint: default
  • Version history: 4.15.1
  • Core version: 4.15.1

Logs

  • None:

WordPress

  • Home URL: $site_url
  • Site URL: $site_url
  • WordPress Version: 6.3.1
  • Number of blogs: 1
  • Multisite Enabled: No
  • Network Enabled: No
  • WP_DEBUG: No
  • WP_DEBUG_DISPLAY: Yes
  • WP_DEBUG_LOG: No
  • DISABLE_WP_CRON: -
  • FORCE_SSL_ADMIN: Yes
  • WP_CACHE: Yes
  • CONCATENATE_SCRIPTS: No
  • COMPRESS_SCRIPTS: -
  • COMPRESS_CSS: -
  • ENFORCE_GZIP: -
  • WP_LOCAL_DEV: -
  • WP_CONTENT_URL: $site_url/wp-content
  • WP_CONTENT_DIR: $abs_path/wp-content
  • UPLOADS: -
  • BLOGUPLOADDIR: -
  • DIEONDBERROR: -
  • WPLANG: -
  • ALTERNATE_WP_CRON: -
  • WP_CRON_LOCK_TIMEOUT: 60
  • WP_DISABLE_FATAL_ERROR_HANDLER: -
  • MATOMO_SUPPORT_ASYNC_ARCHIVING: -
  • MATOMO_TRIGGER_BROWSER_ARCHIVING: -
  • MATOMO_ENABLE_TAG_MANAGER: -
  • MATOMO_SUPPRESS_DB_ERRORS: -
  • MATOMO_ENABLE_AUTO_UPGRADE: -
  • MATOMO_DEBUG: -
  • MATOMO_SAFE_MODE: -
  • MATOMO_GLOBAL_UPLOAD_DIR: -
  • MATOMO_LOGIN_REDIRECT: -
  • Permalink Structure: /%postname%/
  • Possibly uses symlink: No
  • Upload base url: $site_url/wp-content/uploads
  • Upload base dir: $abs_path/wp-content/uploads
  • Upload url: $site_url/wp-content/uploads/2023/09
  • Custom upload_path:
  • Custom upload_url_path:
  • Compatible content directory: Yes

WordPress Plugins

  • CookieYes | GDPR Cookie Consent: 3.1.4
  • Fluent Forms: 5.0.9
  • FluentSMTP: 2.2.5
  • GreenShift - Animation and Page Builder Blocks: 6.7.7
  • Matomo Analytics - Ethical Stats. Powerful Insights.: 4.15.1
  • Rank Math SEO: 1.0.202
  • Smart Slider 3 Pro: 3.5.1.19
  • TranslatePress - Multilingual: 2.6.2
  • W3 Total Cache: 2.5.0 (Network enabled)
  • Wordfence Security: 7.10.4 (Network enabled)
  • WP Armour - Honeypot Anti Spam: 2.1.5
  • WPCode Lite: 2.1.3.1
  • WP Google Review Slider: 12.8
  • WP TripAdvisor Review Slider: 11.7
  • WPvivid Backup Plugin: 0.9.91
  • WPvivid Database Snapshots: 0.9.4
  • Active Plugins: 16 (cookie-law-info fluent-smtp fluentform greenshift-animation-and-page-builder-blocks honeypot insert-headers-and-footers matomo nextend-smart-slider3-pro seo-by-rank-math translatepress-multilingual w3-total-cache wordfence wp-google-places-review-slider wp-tripadvisor-review-slider wpvivid-backuprestore wpvivid-snapshot-database)
  • Theme: greenshift (greenshiftchild)

Server

  • Server Info: Apache
  • PHP OS: Linux
  • PHP Version: 8.1.22
  • PHP SAPI: cgi-fcgi
  • PHP Binary Name: /opt/alt/php81/usr/bin/php-cgi
  • PHP Maxmind DB extension: Not loaded
  • PHP Error Reporting: After bootstrap: 4437
  • PHP Found Binary: /opt/alt/php81/usr/bin/php -q
  • Timezone: UTC
  • WP timezone: +07:00
  • Locale: en_US
  • User Locale: en_US
  • Memory Limit: 256M (At least 128MB recommended. Depending on your traffic 256MB or more may be needed.)
  • WP Memory Limit: 40M
  • WP Max Memory Limit: 256M
  • Timezone version: 2023.3
  • Time: 1695979987
  • Max Execution Time: 600
  • Max Post Size: 256M
  • Max Upload Size: 268435456
  • Max Input Vars: 10000
  • Disabled PHP functions: No
  • zlib.output_compression is off: Yes
  • Curl Version: 7.87.0, OpenSSL/1.1.1p
  • Suhosin installed: No

PHP cli

  • PHP cli Version: 8.1.22
  • MySQLi support: ok

Database

  • MySQL Version: 8.0.34
  • Mysqli Connect: Yes
  • Force MySQL over Mysqli: No
  • DB Prefix: wpay_
  • DB CHARSET: utf8mb4
  • DB COLLATE:
  • SHOW ERRORS: No
  • SUPPRESS ERRORS: No
  • Uses Socket: No
  • Uses IPv6: No
  • Matomo tables found: 38
  • DB tables exist: Yes
  • Matomo users found: 1
  • Matomo sites found: 1
  • Required permissions: OK

Browser

  • Browser: (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36)
  • Language: en-us,en

Hi Joana
Thanks for your message.
Some updates from me.

  1. I think the GeoIP has ‘fixed itself’. I am no longer seeing an error and on Matomo > Diagnostics in the Optional Checks Section > Geolocation = ‘ok’

  2. I think the 404 error; ‘“wp-content/plugins/matomo/app/config/global.ini.php”’
    Is coincidental and not related to the problem of not sending reports.
    I administer another website [on another web host] which has a similar set of plugins. Matomo has been working fine there and sending reports but the same 404 error logging is happening there too for the same file. I think this is related to the Wordfence plugin adding a rule in htaccess relating too ‘authz_core’.
    Perhaps we come back to the issue later if it is an issue(?)

  3. To the issue I would like resolved, sending reports by email.
    While I was investigating the other site I confirmed reports are being sent by email and I realised that the charts/graphs embedded in the reports are image PNG files.
    I went back to my problem site and changed the Matomo report to only send tables, no graphs and the email is sent and received correctly.
    If you think it is permissions do you know where the PNGs are generated and located before combining in the email?
    I doubt it is a general permission problem site wide as the site is running fine in all other respects.

1 Like

Hi @adenmoines
As you mentioned reports can or cant’ be sent according to their configuration, in the report configuration where the report is not sent:

  • Can you try to manually download the report (in the reports administration page), and check if this works or not. Don’t forget to select a past date in the date selector (to be able to get existing data)
  • Can you check in the Matomo error log file if you see any intersting thing?

Hi All
Thanks for the suggestions.
It looks like the Matomo WP Plugin update v4.15.2 has ‘fixed’ the Graphs in reports issue.
From the version changleog
" * Workaround FluentSMTP bug in sending emails with attachments (for email reports)"
I have tested this and it is working for the site which had an issue.
I don’t know any more details.
I hadn’t considered this plugin as a conflict as I have another site where I set-up Matomo which was already using FluentSMTP plugin and Matomo reports were working there.
Looks like the problem is being fixed now, one way or the other.