E-Mail Notifications hourly wont work

Hey there,

i would like to get some help about the hourly mail notification feature.

I set up smtp mail configuration on two complete different NC Servers. Both time the test mail was sent quite immidiatly without any problem.

If I turn on e-mail notification for Users (e.g. when files are changed or deleted in shared folders…) there is no e-mail notification at all. I even tried to turn off the stream notification in case it disables e-mail notification if the user is just logged in…

Only one server gave me a notification once, about 20 hours later that a file was deleted. My goal is to get hourly notification.

Second question would be: If i set up to “daily”, is there any possibility to set a time? Like “8:00 am daily”?

Thanks in advance!

No Idea anyone?:neutral_face:

Hi all,

same problem with me Nextcloud 11.0.2 environment. I started testing same way @Simon09 mentioned in his post:

  • Set up email configuration by choosing SMTP --> test runs successfully
  • Created two users and shared one folder with them
  • Enabling email notification for user1
  • logged in with user2 and uploaded new files within the shared folder
  • user1 did not receive any notification by email - the changes of user2 are visible in the activity app for user1

Thanks in advance.

Adding a screenshot of activity setup:

Hi everyone,

I just found out, that I have the same problem since the upgrade to NC 11.0.2.
I will try to investigate and let you know if I find something, but if a developer can help it’s preferred of course :wink:

Hi all,

I added the following line to the config.php

'mail_smtptimeout' => 30,

So far it doesn’t seem that it fixes the issue.

@Schmu you are right - a developer would be helpfull.

Hi,

I found out where in the DB the setting is stored:

mysql> select * from oc_preferences;
+----------+----------------+-------------------------------+-------------------------------+
| userid   | appid          | configkey                     | configvalue                   |
+----------+----------------+-------------------------------+-------------------------------+
| <USER> | activity       | notify_email_comments         | 1                             |
| <USER> | activity       | notify_email_file_changed     | 0                             |
| <USER> | activity       | notify_email_file_created     | 0                             |
| <USER> | activity       | notify_email_file_deleted     | 0                             |
| <USER> | activity       | notify_email_file_restored    | 0                             |
| <USER> | activity       | notify_email_public_links     | 1                             |
| <USER> | activity       | notify_email_remote_share     | 1                             |
| <USER> | activity       | notify_email_shared           | 1                             |
| <USER> | activity       | notify_email_systemtags       | 1                             |
| <USER> | activity       | notify_setting_batchtime      | 3600                          |
| <USER> | activity       | notify_setting_self           | 1                             |
| <USER> | activity       | notify_setting_selfemail      | 0                             |
| <USER> | activity       | notify_stream_comments        | 1                             |
| <USER> | activity       | notify_stream_file_changed    | 1                             |
| <USER> | activity       | notify_stream_file_created    | 1                             |
| <USER> | activity       | notify_stream_file_deleted    | 1                             |
| <USER> | activity       | notify_stream_file_restored   | 1                             |
| <USER> | activity       | notify_stream_files_favorites | 0                             |
| <USER> | activity       | notify_stream_public_links    | 1                             |
| <USER> | activity       | notify_stream_remote_share    | 1                             |
| <USER> | activity       | notify_stream_shared          | 1                             |
| <USER> | activity       | notify_stream_systemtags      | 1                             |

The relevant line should be:
| <USER> | activity | notify_setting_batchtime | 3600 |

Changing the interval to daily in the Web GUI changes this value to 86400 which are 24 hours.
Consequently the setting in the DB is correct and still there is no mail after one hour.

I don’t know if there is a bug in the activity app.

Hi,

on me hourly email-notification is delayed by about 4 or more hours. Unfortunately it is unusable.

hi,

same problem mails are delayed about 8- 72 hours

is there meanwhile a solution?

Same problem here with 12.0.3.

You need to setup a cronjob for the user that runs your webserver, usually “http” or “www-data”.

as root run:
crontab -e -u http

enter:

*/10  *  *  *  * php -f /var/www/nextcloud/occ activity:send-mails hourly
0  8  *  *  *    php -f /var/www/nextcloud/occ activity:send-mails daily
0  18 *  *  FRI  php -f /var/www/nextcloud/occ activity:send-mails weekly

You can change the time settings as needed.
In my case hourly mails are sent every 10 Minutes. It’s rather an instant mail for me :wink:

Have you set the mail addresses (sender and recipient) correctly? If you control the mail server, the logs could be interesting. I had the cases that some sender verification didn’t work or the addresses weren’t set correctly.
You can use sendmail as sending option and then install ssmtp. This is a small mailer which allows you to set some options and also logs all the mails. So you see if mails have been sent out. It should also be in your nextcloud-logs:

`

{“reqId”:“DJ4ZdeLOO7z5cnMmEYfN”,“level”:0,“time”:“2017-12-02T17:45:03+00:00”,“remoteAddr”:"",“user”:"–",“app”:“core”,“method”:"–",“url”:"–",“message”:“Sent mail to “Array\n(\n [user@example.com] => username\n)\n” with subject “Activity notification””,“userAgent”:"–",“version”:“13.0.0.6”}

`

Running 13.0.1…

I’m having the same issue of the hourly notification not working. Yesterday around 5 PM I downloaded a file and finally received a notification email at 9AM this morning.

Why do the developers include features that just DON’T WORK !

did you read the comments here? there were suggestions on how to possibly resolve your problem

In addition to what JimmyKater wrote, my suggestion even comes from the documentation by the way:
https://docs.nextcloud.com/server/13/admin_manual/configuration_server/activity_configuration.html?highlight=hourly

So this is ridiculous. There where changes and how to address them is documented. Following the docs, it works for most of us. Why do you think it should be the developer’s fault when your machine isn’t working as expected whereas the servers of others do?
For all the work the developers put into that project, we could be a little bit more thankful and be a bit nicer.

1 Like

It took quite a while to answer the original poster and he probably gave up, so we have no feedback. NC11 is no longer supported, to get to the bottom of the problems back then is not possible. To avoid others to join the discussion with not functioning mail notification, let’s close this topic here. If you have such a problem, please open a new topic.

2 Likes