Skip to content

fix no sent mailbox configured #8311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

fix no sent mailbox configured #8311

wants to merge 10 commits into from

Conversation

hamza221
Copy link
Contributor

@hamza221 hamza221 commented Mar 28, 2023

Fix #4153
Repro:

  1. remove the default folder for sent ("you can do it in vuex by setting sentMailboxId to null")
  2. Try to send a message

Fix:
Ps: Other ideas are appreciated

  1. Check if a mailbox named Sent or equivalent in the local language
  • if it exists set it as Sent default folder and resend message, if not:
  1. create a new mailbox
  2. set it as send default folder
  3. resend the message
  4. Catch exceptions and inform the user with toasts accordingly

@JohannesGGE
Copy link
Contributor

Where exactly do you set sentMailboxId to null? (I can't get the error reproduced)

@hamza221
Copy link
Contributor Author

hamza221 commented Jul 19, 2023

Where exactly do you set sentMailboxId to null? (I can't get the error reproduced)

I do it in the vue.js devtools browser extension

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes feel a bit too complex and messy. I think we should try to find a cleaner, less complicated spot to place the logic. I'll think about an alternative.

@ChristophWurst
Copy link
Member

The changes feel a bit too complex and messy. I think we should try to find a cleaner, less complicated spot to place the logic. I'll think about an alternative.

How about we just move the logic into the head of NewMessageModal::onSend? We have access to the accountId and can fetch the account, check for the mailbox existence and act, then proceed with the usual send logic.

The good news is that this isn't too far off the current state. The code just has to be pushed around a bit.

I also think we don't necessarily need a special loading text for this state. For the user it's sufficient if we show Sending … while creating/assigning the mailbox

@ChristophWurst ChristophWurst mentioned this pull request Nov 29, 2023
24 tasks
@hamza221 hamza221 marked this pull request as draft March 4, 2025 14:00
@hamza221 hamza221 force-pushed the bug/not-sent-mailbox branch 2 times, most recently from 3913ba7 to 40f8232 Compare March 7, 2025 16:37
@hamza221 hamza221 requested a review from ChristophWurst March 7, 2025 16:38
@hamza221 hamza221 marked this pull request as ready for review March 7, 2025 16:38
@hamza221 hamza221 requested a review from kesselb as a code owner March 7, 2025 16:38
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logical flow looks good otherwise

@hamza221 hamza221 force-pushed the bug/not-sent-mailbox branch from 3201810 to 89aaf43 Compare March 16, 2025 18:39
@hamza221 hamza221 force-pushed the bug/not-sent-mailbox branch from 89aaf43 to 3503feb Compare March 16, 2025 18:40
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No test coverage

@ChristophWurst ChristophWurst marked this pull request as draft March 17, 2025 12:05
@hamza221 hamza221 marked this pull request as ready for review March 17, 2025 15:38
@hamza221 hamza221 marked this pull request as draft March 17, 2025 18:16
@hamza221 hamza221 marked this pull request as ready for review March 17, 2025 18:19
@ChristophWurst
Copy link
Member

Works, but not as expected.

Bildschirmfoto vom 2025-05-16 13-28-28

I see this chain of toasts, so the logic kicks in.

Bildschirmfoto vom 2025-05-16 13-29-15

But my sent mailbox is now set to nullSent. Which is not just a UI glitch, it created this mailbox:

image

The creation shouldn't even happen, because I do have a mailbox named Sent and it does have the \sent attribute:

image

@hamza221 hamza221 requested a review from ChristophWurst May 24, 2025 16:25
@ChristophWurst
Copy link
Member

It fails to detect my existing mailbox Sent and runs into a HTTP400. The toasts are honestly overwhelming and confusing.

First I get this
Bildschirmfoto vom 2025-05-27 09-52-22

Bildschirmfoto vom 2025-05-27 09-52-25

image

The message is sent and stored in my mailbox called "Sent", nevertheless?!

@hamza221
Copy link
Contributor Author

hamza221 commented Jun 5, 2025

It fails to detect my existing mailbox Sent and runs into a HTTP400. The toasts are honestly overwhelming and confusing.

First I get this Bildschirmfoto vom 2025-05-27 09-52-22

Bildschirmfoto vom 2025-05-27 09-52-25

image

The message is sent and stored in my mailbox called "Sent", nevertheless?!

Toasts were all over the place,
It should make sense now, I added early returns and removed extra Toasts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"No sent mailbox configured" Error when sending a message
4 participants