Hello,
Our Email Reports function is not working in Piwik. When a user schedules a daily or weekly Email Report in Piwik, the Email response is never sent.
I tested an external e-mail (@yahoo.com) instead of our company e-mail (@autodesk.com) and the result is the same.
When using the "Send Report Now" option, we still never receive an email. We can download the report just fine, but it never sends Emails.
I tried setting a custom GMail SMTP server as the outgoing email server, with a standard account tied to it, but it still does not send the Email Report.
Could someone please kindly take a look at our Piwik Email Reports configuration, let us know where this issue is stemming from, and how to fix? Thanks,
Alex Sturm
SharePoint Engineer
Direct: 415.539.4638
Email: alex.sturm@autodesk.com
Hours: Mon-Fri, 8am-5pm PST
I'm using Gmail too. Can you check if your config/config.ini.php
looks like this:
[mail]
transport = "smtp"
port = 465
host = "smtp.gmail.com"
username = "youremail<a class='mention' href='https://github.com/gmail'>@gmail</a>.com"
password = "yourpassword"
encryption = "ssl"
All those options should be set. If you're using 2 factor authentication you need to generate an app specific password
You might be also interested in https://github.com/piwik/piwik/issues/8613 but I did not have to enable less secure apps
Hi Thomas,
Thanks for getting back to me so quickly. I am waiting to speak with my developer to get these details. I should have an update early next week. Have a good weekend.
-Alex
Hi Thomas,
The developer has confirmed that the config file shows as expected.
That is a similar post. Perhaps we could benefit from trying the suggestion. We are also looking to see if our firewall is a factor.
I will follow-up when we know more. Thanks for your help.
-Alex
Hi Thomas, hope you are doing well. I received some information from our developer and I am passing this along;
Hi Alex,
I think the issue is with Piwik code.
The email functionality works fine in my test server with the same Gmail account and settings.
I suspect the module for ScheduleReports is not working in production. The reason that I think in this way because the URL in production does not invoke ScheduleReports when POST by click “Send Report Now” after compared the test server and the production server. The first link is from the production server and the second is from the test server. I caught these links by fiddler.
https://piwik-prd.aws.autodesk.com/piwik/index.php?date=2015-10-27&idSite=2&period=day
http://10.41.88.14/piwik/index.php?module=ScheduledReports&action=index&idSite=1&period=day&date=yesterday
One option that we can consider is to update the piwik version. but since piwik is actively being used for production purpose. I am not sure whether we should go that far.
Here’s link in Piwik mentioned the update information.
Any ideas here? Do you think the upgrade would work? Or is there something we can do in our current configuration to allow the e-mails to work? We tried enabling less secure apps via GMail, still having the same result. Thanks for your time.
-Alex
I'm not quite sure I understand the issue. Emails are sent on the test server but not on the production server? If ScheduledReports is not invoked on the production server it might be a bug in that Piwik version, maybe an ad blocker or something. On which Piwik version are you currently?
Hi Thomas,
We are currently using Piwik version 2.11.0.
Regards,
Alex Sturm
EIS EO Service Desk SharePoint Engineer | AMER
Enterprise Information Services
DIRECT +1 415 539 4638
Autodesk, Inc.
Landmark @ One Market
San Francisco, CA
www.autodesk.comhttp://www.autodesk.com/
[Description: Description: Description: Email_Signature_Logobar]
From: Thomas Steur [mailto:notifications@github.com]
Sent: Tuesday, November 03, 2015 11:32 AM
To: piwik/piwik
Cc: Alex Sturm
Subject: Re: [piwik] Users not receiving Emal Reports (#8996)
I'm not quite sure I understand the issue. Emails are sent on the test server but not on the production server? If ScheduledReports is not invoked on the production server it might be a bug in that Piwik version, maybe an ad blocker or something. On which Piwik version are you currently?
—
Reply to this email directly or view it on GitHubhttps://github.com/piwik/piwik/issues/8996#issuecomment-153463079.
An update to latest 2.15.0 should be fine.
Apart from that if the URL in production does not invoke ScheduleReports it sounds like a browser/client issue to me. Please make sure there is no ad blocker or something similar active.
Hi Thomas,
We do not think this is a browser/client issue, as our dev is able to send the report for his test piwik instance with the same browser/client, which we are not able to do for our Production Piwik instance.
We will look into updating to the latest version. Will keep you posted on the result.
Have a good weekend :)
-Alex
Just FYI: If an Ad blocker is active or something similar it is still possible that it works in the local Piwik instance but not on the Production Piwik instance. There might be a rule in the ad/tracking blocker that blocks the production domain specifically. We've had such issues quite often.
Hi Thomas,
We do not think the ad-blocker applies to our situation. I have tried sending a report on our test piwik instance with the same configuration and it is working without issue; http://10.41.88.14/piwik/index.php?module=ScheduledReports&action=index&idSite=1&period=day&date=yesterday
Thoughts? Thanks.
Alex
Sorry no other thoughts here. If it works in test instance but not in production there must be some configuration different. What you described sounded like an ad-blocker or privacy/tracking blocker but if there is no such extension active in the browser then it's hard to say.
Can you maybe or a colleague maybe try to debug the request from the browser to PHP? Maybe the request gets blocked by something in the browser or by the webserver or a firewall or something?
@autodeskpiwik upgrade to 2.15.0 where this issue may be fixed
Thank you Thomas, we will get ready to upgrade our instance. I will inform you of the results – should be able to upgrade this Friday.
Regards,
Alex Sturm
EIS EO Service Desk SharePoint Engineer | AMER
Enterprise Information Services
DIRECT +1 415 539 4638
Autodesk, Inc.
Landmark @ One Market
San Francisco, CA
www.autodesk.comhttp://www.autodesk.com/
[Description: Description: Description: Email_Signature_Logobar]
From: Thomas Steur [mailto:notifications@github.com]
Sent: Sunday, November 22, 2015 12:08 PM
To: piwik/piwik
Cc: Alex Sturm
Subject: Re: [piwik] Users not receiving Emal Reports (#8996)
Sorry no other thoughts here. If it works in test instance but not in production there must be some configuration different. What you described sounded like an ad-blocker or privacy/tracking blocker but if there is no such extension active in the browser then it's hard to say.
Can you maybe or a colleague maybe try to debug the request from the browser to PHP? Maybe the request gets blocked by something in the browser or by the webserver or a firewall or something?
—
Reply to this email directly or view it on GitHubhttps://github.com/piwik/piwik/issues/8996#issuecomment-158794227.
Woops, off this Friday – not sure when but we will let you know when it’s done and tested. Thank you.
Regards,
Alex Sturm
EIS EO Service Desk SharePoint Engineer | AMER
Enterprise Information Services
DIRECT +1 415 539 4638
Autodesk, Inc.
Landmark @ One Market
San Francisco, CA
www.autodesk.comhttp://www.autodesk.com/
[Description: Description: Description: Email_Signature_Logobar]
From: Alex Sturm
Sent: Monday, November 23, 2015 8:48 AM
To: 'piwik/piwik'; piwik/piwik
Subject: RE: [piwik] Users not receiving Emal Reports (#8996)
Thank you Thomas, we will get ready to upgrade our instance. I will inform you of the results – should be able to upgrade this Friday.
Regards,
Alex Sturm
EIS EO Service Desk SharePoint Engineer | AMER
Enterprise Information Services
DIRECT +1 415 539 4638
Autodesk, Inc.
Landmark @ One Market
San Francisco, CA
www.autodesk.comhttp://www.autodesk.com/
[Description: Description: Description: Email_Signature_Logobar]
From: Thomas Steur [mailto:notifications@github.com]
Sent: Sunday, November 22, 2015 12:08 PM
To: piwik/piwik
Cc: Alex Sturm
Subject: Re: [piwik] Users not receiving Emal Reports (#8996)
Sorry no other thoughts here. If it works in test instance but not in production there must be some configuration different. What you described sounded like an ad-blocker or privacy/tracking blocker but if there is no such extension active in the browser then it's hard to say.
Can you maybe or a colleague maybe try to debug the request from the browser to PHP? Maybe the request gets blocked by something in the browser or by the webserver or a firewall or something?
—
Reply to this email directly or view it on GitHubhttps://github.com/piwik/piwik/issues/8996#issuecomment-158794227.
Sorry the issue was closed just with a comment to upgrade. I reopened it.
Thanks Thomas, looking forward to your findings. Have a great day :)
Alex
It still works fine here. Could you or a developer or someone have a look at the request from the browser to the Piwik server? It might be a server configuration issue. The question is the browser actually sending the needed request and is the server accepting it forwarding it to PHP when you press the "Send now" option.
Hi Thomas,
I have forwarded these details to my dev, and will follow-up when the task is complete. Thanks!
Alex
Hi Thomas,
Hope you are well. I have received a response from my dev;
Looks like we are back to the former state. You can find the request from the browser to the piwik server in the attached email. (See attached)
Alex
Hi @autodeskpiwik . There's nothing attached. Can you maybe attach it on Github directly?
Had to use Firefox for upload, didn't work in IE 10. Thanks!
I tried to open the file in the zip but many characters are actually not really readable. From what I can see it's a similar message like in https://github.com/piwik/piwik/issues/8996#issuecomment-153432005
Do you know if someone had a look whether the request was actually triggered from Piwik or not? This can be checked with developer tools in the browser. If it works on a local Piwik instance in test, but not in production, it seems like there is some kind of misconfiguration somewhere. We haven't gotten any other issues. Maybe check whether server configuration is the same on production and locally and you will have to debug the request from the browser to the server and you need to check where the request gets aborted or fails. We can't do much here otherwise unless we get access to the Piwik instance and / or server.
piwik 2.16.0 reports are not send automatically using the php function. Using the "Send report now" function the report is send without any problems immediately.
With PHP 5.6.17-0+deb8u1 and now PHP 5.6.19-0+deb8u1
Thanks for the note @davidlemaitre