nextcloud / approval

✅ Approve/disapprove files in the sidebar
GNU Affero General Public License v3.0
27 stars 8 forks source link

Not sending Email Notifications #29

Open zikhik opened 2 years ago

zikhik commented 2 years ago

Not sending Email Notifications to users. Please, help me! Log shows it:

{"reqId":"H16EbjgcSJA5DtTAXPyy","level":3,"time":"2022-02-28T09:00:02+03:00","remoteAddr":"","user":"--","app":"activity","method":"","url":"--","message":"Failed sending activity email to user \"D9070CCE-7EA9-4E4B-89E3-2E4C1B5EC7EF\"","userAgent":"--","version":"23.0.2.1","exception":{"Exception":"OC\\User\\NoUserException","Message":"Backends provided no user object","Code":0,"Trace":[{"function":"getUserFolder","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":65,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyRoot.php","line":40,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/approval/lib/Activity/ApprovalProvider.php","line":125,"function":"getUserFolder","class":"OC\\Files\\Node\\LazyRoot","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/MailQueueHandler.php","line":454,"function":"parse","class":"OCA\\Approval\\Activity\\ApprovalProvider","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/MailQueueHandler.php","line":359,"function":"parseEvent","class":"OCA\\Activity\\MailQueueHandler","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/MailQueueHandler.php","line":164,"function":"sendEmailToUser","class":"OCA\\Activity\\MailQueueHandler","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/BackgroundJob/EmailNotification.php","line":61,"function":"sendEmails","class":"OCA\\Activity\\MailQueueHandler","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/Job.php","line":51,"function":"run","class":"OCA\\Activity\\BackgroundJob\\EmailNotification","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php","line":58,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":128,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/lib/private/Files/Node/Root.php","Line":372,"CustomMessage":"Failed sending activity email to user \"D9070CCE-7EA9-4E4B-89E3-2E4C1B5EC7EF\""},"id":"621c64f70a8c6"}
forsequans commented 1 year ago

Facing the same issue in NX24.0.5. It looks like it cannot find the user when using its ID

forsequans commented 1 year ago

To give more details, even if I've no idea about how to fix, e-mails are not sent when the even happen. That is when it is required to send an e-mail when a approval event happen. This is set in user settings of global (administration) settings. But emails sent as email reminders about unhandled notifications (set in user settings notifications menu) are sent and include the approval events.

thekk1 commented 1 year ago

Same problem on NC 25.0.5.1

EvgeniaPatsoni commented 1 year ago

I am facing a similar issue, where emails are being sent to some users only.

For example I have an approval workflow:

UserA uploads a file and requests approval -> UserB must approve the file -> After UserB, UserC should also approve the file.

UserB and UserC receive emails about files that need their approval, just fine. However, UserA who initialy uploaded the file, never receives emails about the approval or rejection of this file. He only receives notification from within the Nextcloud UI.

(Yes I tested this with several email accounts for UserA, it is working with none of them)

NC 26.0.1