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

Warn if sent_box was not set #564

Open
josch opened this issue Feb 17, 2013 · 2 comments
Open

Warn if sent_box was not set #564

josch opened this issue Feb 17, 2013 · 2 comments

Comments

@josch
Copy link
Contributor

josch commented Feb 17, 2013

I just lost a couple of emails I sent because I forgot to set sent_box in my alot config. Here a couple of solutions:

  • Add a note to the docs saying that if sent_box == None (the default) then all sent messages will be discarded
  • If an email is sent and sent_box == None, display a warning to the user asking him if he really wants to send and discard his email instead of first setting the sent_box configuration value to something unequal None. To this end, add an additional configuration option which suppresses this warning.
  • Instead of defaulting sent_box to None, choose a reasonable default location for sent email. Maybe in ~/Sent or in ~/.config/alot/Sent or at least in /tmp? Combined with the warning message, the user can then retrieve sent email, add it to the proper location and set the sent_box option. There could be a configuration option default_sent_box which sent_box defaults to when equal to None?

I would supply a patch for the second option but there is this issue with the hooks being unable to stop a sending operation when depending on user input (#395).

Similar reasoning can be applied to the draft_box option.

@pazz
Copy link
Owner

pazz commented Feb 17, 2013

i like the last solution best. the warning could be shown only if the sending Account's sent_box parameter is None
and tell the user to change that in order to get rid of this msg..

@pazz
Copy link
Owner

pazz commented Jul 1, 2013

sorry, that’s your second proposition :)
Note that #395 has been resolved in the meantime. I think the best way to deal with this would be
to first send the mail and try to store. In case Account.store_mail returns None
(dealt with somewhere here: https://github.com/pazz/alot/blob/master/alot/commands/envelope.py#L241 ;
maybe it'd be nicer to let this raise a StoreMailError instead that is caught here?)
we could:

  • inform the user that there is no maildir set and the copy will hence not be stored nor indexed locally
    and this can be remedied by setting the respective config option.
  • ask whether to save a copy on disk (per ui.choice) and if so, ui.prompt a path, defaulting to $timestamp.eml
  • write the email as is to that path unless prompt got aborted

@pazz pazz modified the milestone: release 0.4 Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants