fix no sent mailbox configured
Fix #4153 Repro:
- remove the default folder for sent ("you can do it in vuex by setting sentMailboxId to null")
- Try to send a message
Fix: Ps: Other ideas are appreciated
- 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:
- create a new mailbox
- set it as send default folder
- resend the message
- Catch exceptions and inform the user with toasts accordingly
Where exactly do you set sentMailboxId to null? (I can't get the error reproduced)
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
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
Creating a new mailbox is not tested, not sure how to without an account
Works, but not as expected.
I see this chain of toasts, so the logic kicks in.
But my sent mailbox is now set to nullSent. Which is not just a UI glitch, it created this mailbox:
The creation shouldn't even happen, because I do have a mailbox named Sent and it does have the \sent attribute:
It fails to detect my existing mailbox Sent and runs into a HTTP400. The toasts are honestly overwhelming and confusing.
First I get this
The message is sent and stored in my mailbox called "Sent", nevertheless?!
It fails to detect my existing mailbox Sent and runs into a HTTP400. The toasts are honestly overwhelming and confusing.
First I get this
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


