Skip to content
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

Message was sent but not saved to sent items folder #1432

Closed
gnilebein opened this issue Feb 14, 2024 · 16 comments
Closed

Message was sent but not saved to sent items folder #1432

gnilebein opened this issue Feb 14, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@gnilebein
Copy link

Describe the bug
When I send e-mails, they are not stored in the "Sent" folder. I think there is a bug which is related to this change: #1404

If you define a "Sent" folder in the identity, they will also be saved there. However, if you have selected "Standard" there, they will not be saved!

I have verified this in two different Nexcloud installations.

To Reproduce
Steps to reproduce the behavior:

  1. Create new Mail
  2. Send it
  3. Check Sent-Folder
  4. Mail not visible there

Expected behavior
Mails should be placed in Sent folder.

Please complete the following information:

  • Browser: Chrome & Firefox
  • IMAP daemon: Dovecot
  • PHP version: 8.2
  • SnappyMail Version: Newest
  • Mode: Nextcloud
@mmallejac
Copy link

mmallejac commented Feb 14, 2024

Having the same one here , also on 2 Nextcloud installation (both Nextcloud 28.0.2)

Done some testing with another webmail and Thunderbird : messages sent has been saved into sent items folder as expected.

We also use the MailboxDetect plugin (latest is 2.6) so that also may interfere here.

Please advise !

@codiflow
Copy link

codiflow commented Feb 14, 2024

Can confirm what @gnilebein mentioned and I don't use a Nextcloud installation. I have the same issue here which is fatal because the sent mails seem to be gone forever 🙈

Unfortunately I have to roll back as this version does not seem to be production ready with such a bug 😥

@codiflow
Copy link

codiflow commented Feb 14, 2024

A little workaround until a fix is available would be to check the box "Place replies in the folder of the message being replied to" and move it manually to the Sent folder after being sent. But new messages without a reply are still being moved into the void.

@gnilebein
Copy link
Author

A little workaround until a fix is available would be to check the box "Place replies in the folder of the message being replied to" and move it manually to the Sent folder after being sent. But new messages without a reply are still being moved into the void.

I think a better workaround is, to set the folder in your identity. This covers all scenarios.
2024-02-14 13_46_41

@xpresas
Copy link

xpresas commented Feb 14, 2024

Same problem. Current workaround by @gnilebein works.

@stan2k
Copy link

stan2k commented Feb 14, 2024

Same here. The workaround works only in Nextcloud. Without Nextcloud is useless. All the folders are set, available and visible. It is possible to manually copy a message to Sent. But outgoing messages are not being saved. No errors, no warnings, Snappy just does not attempt to.

@KuasarCloud
Copy link

hi...is there any way to recover those sent emails, for us it's critical. I can set this parameter globally, I have more than 100 emails to configure identity

@the-djmaze the-djmaze added the bug Something isn't working label Feb 14, 2024
@the-djmaze
Copy link
Owner

I will fix this in a few hours.
Stay tuned!

@KuasarCloud
Copy link

KuasarCloud commented Feb 14, 2024

@stan2k did you were able to copy them to sent?

@stan2k
Copy link

stan2k commented Feb 14, 2024

@KuasarCloud I just tried to drag random message form Inbox to Sent. Just to test, whether Sent folder is writable.

@KuasarCloud
Copy link

KuasarCloud commented Feb 14, 2024

got it @stan2k, I guess the not saved emails by snappymail are lost forever, right?

@the-djmaze
Copy link
Owner

the-djmaze commented Feb 14, 2024

I guess the not saved emails by snappymail are lost forever, right?

Correct, for your mailbox.
Recipient does have them though.

As for the bug

Sorry, i didn't notice why it failed.

  1. The property sentFolder is a KnockoutJS observable.
  2. Observables are functions.
  3. I added toJSON to the observables so that JavaScript can easily use the value inside JSON.

So what actually happened is:

var sentFolder = identity.sentFolder;
if (sentFolder) {
    // Yes we have it defined, but oops it is the function not the value.
    sentFolder.toJSON(); // oops it is empty
}

While it should be

var sentFolder = identity.sentFolder(); // now we get the value
if (sentFolder) {
    // Yes we have the right value!
}

@gnilebein workaround works because then sentFolder.toJSON() returns the set non-empty value.

@codiflow
Copy link

Thanks for being completely transparent and clarifying what led to the bug 🎉

And also a big thanks for fixing this so fast! Big Thanks! 🙏

@KuasarCloud
Copy link

@the-djmaze thanks for your help and explaining what happened. When do you expect to have uploaded to download it from Nextcloud.

@the-djmaze
Copy link
Owner

When do you expect to have uploaded to download it from Nextcloud.

It is submitted to Nextcloud, it could take minutes up till 1 day (i think) but that is a Nextcloud website thing.
So i deleted the snappymail-2.34.0-nextcloud.tar.gz and snappymail-2.34.1-nextcloud.tar.gz from my server to prevent people downloading the bugged versions.

@KuasarCloud
Copy link

Working well in Nextcloud

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants