Email Won't Send Subdomain

Hello,

First post here and new to Piwik - loving it so far thanks!

One issue though, I can’t seem to get the email notifications to work. My reports will not send (Error was 'Unable to send mail), nor will the ‘forgot my password’ emails (the mail() function may be disabled).

I know my emails work just fine as I am on shared hosting and have no issues with any of my other websites. The only difference I can think of is that I have installed Piwik on a subdomain of my root site (www.analytics.mydomain.com) - would this make any difference, or are there any configuration changes I need to make because of this?

I have had a look at the logs > empty. Also I can’t see anything out of the ordinary in my php file.

Any help would be appreciated,

Regards

J

I should note, I’m using v 2.1.0

hard to say, Piwik doesn’t do anthing special with the PHP mail() function. You can also specify the SMTP settings in the interface if it helps (eg. to use your own SMTP server)

Hi,

Thanks for teh reply.

They still won’t send, displaying the same error. I’d rather not use smtp server settings, I though it was supposed to work ‘out of the box’.

Great product. I just need the email reports working, any help much appreciated.

error below


An error occured while sending 'HTML Email Report - 1.2014-03-27.1.en.html' to info@mydomain.com. Error was 'Unable to send mail. '

J

Unable to send mail sounds like a server configuration issue. Maybe you can setup a different email server (go to Settings > General Settings > Email settings)

Thanks for the reply,

The only other server I can setup in the configuration is smtp - I don’t want to use this. I’d rather use the default php mail.

I’d appreciate if anybody could lend some assistance here as the reports are vital to me using the software on many websites for clients.Otherwise it’s back to Google I go! Which I’d rather not! :slight_smile:

Regards,

Johnny

Just an update, I have followed the gmail smtp instructions here How do I send Piwik emails using Gmail SMTP server? - Analytics Platform - Matomo and it still doesn’t work.

I have also downloaded the latest piwik version, and re uploaded them via filezilla (binary).

Just can’t get these to work?

this is the error when using the gmail smtp settings above


An error occured while sending 'HTML Email Report - 3.2014-03-31.1.en.html' to info@MyDomainName.com. Error was 'Connection timed out'

Looks like your server can’t send emails. Ask your webhost for help as this is not a piwik issue.

That’s just incorrect - this is a Piwik issue, nothing to do with my server configuration or webhost. Please read my earlier posts again where I explained that I AM able to send emails from my server, as I host multiple websites and have no issues sending emails whatsoever from any other website I host.

Also, your post doesn’t explain the fact that sending emails won’t work when using Gmail and the recommended Piwik settings - nothing to do with my webhost.

If there is anybody else that can offer some valuable assistance I would be most grateful.

J

Just an update, I have also tried to setup a cron job as suggested here How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo but that also doesn’t work. The archive file is created however it just contains the default config settings, nothing else.

Is anybody else having this issue/had this issue? I’d like to know how it’s resolved if possible.

The next thing I could try is install it on my main domain i.e not a sub domain, although I dont know how this would make a difference? I would like to keep the existing statistical info regarding the websites that I am currently tracking.

Any help is appreciated,

Regards

J

Error was ‘Connection timed out’

I just saw this error message and it is not a Piwik issue because it clearly says Error was ‘Connection timed out’

Do you see other error message that indicate there is maybe a bug in piwik?

Hi Matt,

Thanks for the advice, I don’t see any other messages. Although the message does differ depending on whether or not I use smtp or php mail. If smtp I get ‘Connection timed out’. If php mail I get ‘Unable to send mail’

I have created a bug possible bug #4944 so hopefully somebody can have a closer look. Or advise me on deeper troubleshooting ideas?

All other stat info working great.

J

update - I have managed to get the email reports to send. Looks like it’s a Piwik config issue after all. Once I change my trusted host from www.mysubdomain.mydomain.com to www.mydomain.com it works, BUT there is a huge yellow error message on my screen see below

[quote="Warning: You are now accessing Piwik from http://www.analytics.mydomain.com/index.php, but Piwik has been configured to run at this address: http://www.mydomain.com/index.php.
Piwik may be misconfigured (for example, if Piwik was recently moved to a new server or URL). You can either click here and add www.analytics.johnnyshongo.com as the valid Piwik hostname (if you trust it), or
click here and go to www.mydomain.com to access Piwik safely.

How do I fix this problem and how do I login again?
The Piwik Super User can manually edit the file piwik/config/config.ini.php and add the following lines:
[General]
trusted_hosts[] = “www.analytics.mydomain.com"
After making the change, you will be able to login again.
You may also disable this security feature (not recommended). To do so edit config/config.ini.php and add:
[General]
enable_trusted_host_check=0”]

[/quote]

another update for those concerned;

I have now completely removed the installation from my sub domain and re-installed the latest piwik on my main domain root level (/analytics).

My trusted domain is domain.com

Emails send fine when I access piwik from domain.com/analytics but NOT www.domain.com/aanalytics

Can anybody explain why?

Thanks

Tried to configure your ports of entry and exit mail?
Maybe it has to do with the settings and emails are sent from the root


Mercedes Benz 190 sl Convertible 1955

[quote=“Tried to configure your ports of entry and exit mail?
Maybe it has to do with the settings and emails are sent from the root”]
[/quote]

I haven’t set these as I am using the default php mailer. It must have something to do with root domains, and sub domains??

Thanks for the help btw