the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
924 stars 109 forks source link

Cancel Send #1600

Open beankylla opened 1 month ago

beankylla commented 1 month ago

Is your feature request related to a problem? Please describe. I sometimes am a bit too hasty of sending an email, or press control + enter by accident

Describe the solution you'd like After sending an email a 10 seconds window should enable cancellation of sending the email. This would re-open the email in edit mode.

Describe alternatives you've considered Not sure there are any alternatives but major clients propose this

Additional context Hope is clear, happy to support in any way I can

the-djmaze commented 1 month ago

When send to the server there is no way to abort it.

We could create a delay timer that waits with sending, but that means you have to wait N seconds every time the email is about to be send.

beankylla commented 1 month ago

the way i've seen it implemented in other clients is: Counter starts in the background and mail will be launched unless cancel button is pushed, regardless of if page is left or not. Maybe that is a bit tricky to implement do not know but i love the functionality! :)

Would be ok to delay my emails by 10 seconds :)

the-djmaze commented 4 weeks ago

And what to do on cancel? Reopen for editing? Discard? etc.

TheCuteFoxxy commented 3 weeks ago

And what to do on cancel? Reopen for editing? Discard? etc.

Not sure about other enviroments but in an enterprise enviroment using Outlook, if you cancel an email pending being sent, it sets it back as a draft but does not re-open it for editing.

the-djmaze commented 3 weeks ago

@TheCuteFoxxy actually Outlook is terrible in one case. When send, you can still cancel it. It will send a new email with cancel command and outlook will delete both mails. This only works in Outlook and every other mail client does not. So it is a fake assumption that it will work.

But saving it as draft and send later would be a good idea. Then when send it moves to the Sent box.

beankylla commented 3 weeks ago

And what to do on cancel? Reopen for editing? Discard? etc.

i would reopen for editing. From there user can decide to discard.

This is the UI example of my email provider's app.

image

The blue bar progresses to show you time running out, with a click on cancel the message is reopened for editing

stellarpower commented 3 weeks ago

Is it possible to keep it in the drafts box server-side? I think this makes the most sense to me. If a message isn't already saved as a draft, save it, then send (with or without timer). I just had Roundcube send something off by accident when I think I hit tab + enter trying to add whitespace. The more important thing would be that the email isn't sent if iI cancel it. If the UI did nothing and I had to dig in my drafts to find it again, that wouldn't be an issue for me.

Another option might be the "scheduled send" some clients offer. I assume this would need server-side support though. I am hosting SnappyMail through nextcloud, so I guess it might be possible to use some kind of Cron hook, but, I assume for a more vanilla deployment if the page is closed then this would no longer be possible.

beankylla commented 3 weeks ago

i think just reopening the edit window is the easy way out. From there you can save and close or send again.

Or is there anything against ?