OutboxWorkerJob does not work with contact groups
@kesselb is already working on this.
Since May 30, 2025.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
Steps to reproduce
- Create a contact group with at least one contact with an email address.
- Create an email in the Mail app to this contact group (To, CC, or BCC), send it, and wait (at least 10 seconds).
- Create another email as before, send it, and log out immediately (and close the tab or browser).
Expected behavior
Both emails should have been delivered in both cases (without an error message).
Actual behavior
The first email is sent.
The second email is not sent. It remains in the outbox. Ten minutes later, the following entry will appear in the Nextcloud log: “Could not send outbox message 1603: aTest1 (Contacts) has no members with email addresses.”
Mail app version
5.1.1 and all older since at least about 6 month
Nextcloud version
31.0.5 and all older since at least about 6 month
Mailserver or service
no matter
Operating system
no matter
PHP engine version
PHP 8.3
Nextcloud memory caching
memcache.local
Web server
Nginx
Database
MariaDB
Additional info
I traced the problem with Xdebug until I found the cause:
When attempting to open the address books, the user is queried from the session. There is no session and no user in the cron job, so ContactsManager does not return any contacts.
A distinction must be made between whether the services are running within an active session with a user or within the cron job. In the second case, the user must be actively set so that their address books can be loaded.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.