@jfqd opened this Issue on November 24th 2014

Sending emails through the website works just fine, but sending it through the cronjob fails with the following error:

ERROR CoreConsole[2014-11-24 01:11:40] [085de] Got invalid response from API request: http://piwik.example.com/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=token-string&trigger=archivephp. Response was 'task,output Piwik\Plugins\ScheduledReports\API.sendReport_10,ERROR: An error occured while sending 'HTML Email Report - 10.2014-11-17.9.de.html'  to abc<a class='mention' href='https://github.com/example'>@example</a>.com. Error was '5.1.7 Bad sender address syntax
' Piwik\Plugins\ScheduledReports\API.sendReport_100,ERROR: An error occured while sending 'HTML Email Report - 100.2014-11-17.94.de.html'  to def<a class='mention' href='https://github.com/example'>@example</a>.com. Error was '5.1.7 Bad sender address syntax
''
ERROR CoreConsole[2014-11-24 01:11:40] [085de] 1 total errors during this script execution, please investigate and try and fix these errors.

I am using the latest version 2.9.1. This issue started after the update from version 1.1.2 to 2.8.

I think this issue is not related to #4944 or the following forum entry http://forum.piwik.org/read.php?2,113063.

In the log of the mailserver I only can see a connect and disconnect message, but nothing else.

Any ideas how to fix this issue?

@mattab commented on December 1st 2014 Member

Hi @jfqd can you try to set the URL from: to your email addresses using the tip in this FAQ - maybe this would fix it?

@jfqd commented on December 1st 2014

@mattab Thank you for your suggestions.

Last week I added noreply_email_address and defaultHostnameIfEmpty to the configuration and all emails this morning were send out fine.

Wondering why email through the website is working without these two config params.

@mattab commented on December 2nd 2014 Member

Wondering why email through the website is working without these two config params.

in your config/config.ini.php do you have a trusted_hosts entry ? what value is it set to?

@jfqd commented on December 2nd 2014

Yes there is an entry:

trusted_hosts[] = "piwik.example.com"

These are the values for noreply_email_address and defaultHostnameIfEmpty:

[General]
noreply_email_address = "noreply<a class='mention' href='https://github.com/example'>@example</a>.com"
[mail]
defaultHostnameIfEmpty = "example.com"

Where example.com has to be exchanged by the real domain I´m using :-)

@stibay commented on March 16th 2016

Got the same error on the forget password page on login.
Figgured out that login_password_recovery_email_address was the problem and had to be set manually in the config.ini file. Piwik 2.16.0

@mattab commented on June 10th 2019 Member

Hello everyone,
We have created a FAQ to help about this issue: https://matomo.org/faq/troubleshooting/faq_34856/

Hopefully it will help people get their emails working. if you have any issue with receiving emails from Matomo please follow the FAQ and let us know how it goes (by following the "Contact support" link in the FAQ). Have a great day!

This Issue was closed on June 10th 2019
Powered by GitHub Issue Mirror