nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
830 stars 257 forks source link

Retry message send on fail #6401

Open dodedodo opened 2 years ago

dodedodo commented 2 years ago

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

miaulalala commented 2 years ago

I'd say this is an enhancement, not necessarily a bug, as manually resending the message is still possible. We've discussed this internally before - some visual enhancements were also proposed to signify a message that has failed. So +1 from me.

Thanks for opening the ticket!

dodedodo commented 2 years ago

Hey Miaulalala, thx for your response.

I get what you're saying, but I'm not sure I completely agree. The feedback a user gets (message sent notification) is sometimes plain incorrect. The code may be working as expected. But from a user's perspective, the application / UI does not work as expected.