nextcloud / nextcloud/mail

Retry message send on fail

Open
#6,401 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Steps to reproduce

This one is not easily reproducable. You need an email server that will error on the first try, and succeed on the 2nd.

  1. Send email
  2. Have email server (SMTP) return an error the first time
  3. Message remain in outbox forever.
Expected behavior
  1. Send email
  2. Have email server (SMTP) return an error the first time
  3. Nextcloud mail detects an error and automatically tries again in 30 seconds, with a maximum of 5 retries.
  4. On the second try the mail actually sends.
Actual behavior

My personal mailserver has an odd warmup issue where it does not send the first message after x hours of inactivity. The how and why is outside of the scope of this issue. In general, mail services can be temporarily unavailable for numerous reasons.

Nextcloud mail used to tell me my mail did not send properly and offer me a button to 'retry'. With the new outbox system, this changes. I first get a toast pop-up notification that says my email is sent (but it's not. It is retained in outbox because of the 'undo send' feature). After some 30 seconds nextcloud mail shows a toast pop-up 'Could not send message'.

At this point I might not even notice the error message because I already saw the 'Message sent' toast message and clicked away.

The actual email will never arrive without manual intervention. That is; go to outbox and click 'send now'.

Mail app version

1.12.0

Mailserver or service

Self-hosted mailserver (mailcow)

Operating system

Docker

PHP engine version

PHP 8.0

Web server

Other

Database

MariaDB

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 by tracing the outbox send flow and its SMTP error handling, using the reported 30-second delay and manual “send now” action as entry points. Done means a temporary first-send failure triggers automatic retries every 30 seconds, up to five attempts, and a later successful attempt sends the message.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.