nextcloud / nextcloud/mail

Erroneous outbox message fails repeatedly

Open
#8,166 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: outbox skill:backend
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce
  1. Compose and send a message
  2. Run into https://github.com/nextcloud/mail/issues/8165, or likely other sending errors
  3. Look at the outbox
Expected behavior

The message is attempted to be sent once, then shows as failed

\OCA\Mail\Service\OutboxService::sendMessage should mark the message as failed

Actual behavior

The message is attempted to be sent with each cron job, e.g. every 5mins.

+------------+--------------+------------+--------+
| account_id | user_id      | send_at    | failed |
+------------+--------------+------------+--------+
|        123 | christoph    | 1677236522 |      0 |
|        123 | christoph    | 1677237015 |      0 |
|        123 | christoph    | 1677237164 |      0 |
|        123 | christoph    | 1677237299 |      0 |
|        123 | christoph    | 1677237430 |      0 |
|        123 | christoph    | 1677237455 |      0 |
|        123 | christoph    | 1677612832 |      0 |
+------------+--------------+------------+--------+
Mail app version

3.0

Mailserver or service

No response

Operating system

No response

PHP engine version

None

Web server

None

Database

None

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with OCA\Mail\Service\OutboxService::sendMessage and trace how an unsuccessful send is handled during cron processing. Reproduce the failure described in the issue and verify that the outbox record is marked failed after the first attempt, so later cron jobs do not retry it.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.