Closed t3chguy closed 9 years ago
Hi @t3chguy ,
This shouldn't be too hard, so test with the referenced commit.
Regards,
Wow @fmbiete that was incredibly fast, thanks!
Well it didn't seem to work, I'll add some debug lines into the code and figure out what's going on. When I wake up that is, I'll post back here when I know something
I'm wondering whether this should be a part of the communication layer, because it's usually the client that determines this? Or do you know of cases where this is implemented in the backend?
The default in most email clients is to leave the 'read' flags alone when deleting messages. I would expect some confusion if someone sets this option by accident and tries to fix it in his or her email client.
@fmbiete,
I'm wondering whether it doesn't work because its in the DeleteMessage method, the comment above it Called when the user has requested to delete (really delete) a message
suggests that its not for messages being moved to trash, and instead for messages being deleted from trash, am I right in thinking that?
@GMTA Yes, it should be part of the client (roundcube, thunderbird offer it). But since the BackendIMAP is our client, that option should be offered there. Disabled by default, and the sysadmin should know what he is doing before enabling it.
@t3chguy Indeed. DeleteMessage is the real delete. MoveMessage will be called when deleting to Trash. Test with the last referenced commit.
I'll test it shortly, only thing I don't understand is why $move_to_trash is defined so early on, there's many ways for it to never get used, why doesn't it for instance get defined much later on?
The Commit works
Yeah, the variable can be defined just before use. :+1: Fixed!
Roundcube Mail has a nice optional feature, which allows you to have all mail being put into Trash to be marked as Read. Any chance of you adding this to your imap backend and making it configurable in its respective config.php?