aboutsummaryrefslogtreecommitdiffstats
path: root/commands/compose
Commit message (Collapse)AuthorAgeFilesLines
* logging: added a log on panicMoritz Poldrack2022-03-232-0/+8
| | | | | | | | | | | | | Since panics still regularly "destroy" the terminal, it is hard to get a stack trace for panics you do not anticipate. This commit adds a panic handler that automatically creates a logfile inside the current working directory. It has to be added to every goroutine that is started and will repair the terminal on a panic. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* all: fix minor issues found by staticcheckMoritz Poldrack2022-03-121-1/+1
| | | | Signed-off-by: Moritz Poldrack <git@moritz.sh>
* commands: implement fuzzy completion for commands and optionskt programs2022-03-071-1/+1
| | | | | | | | Change the option to enable fuzzy completion to be fuzzy-complete, since it's no longer only used for folders Signed-off-by: Kt Programs <ktprograms@gmail.com> Acked-by: Koni Marti <koni.marti@gmail.com>
* aerc: always check SelectedAccount return valueRobin Jarry2022-02-251-1/+5
| | | | | | | | | | | | | | | | aerc.SelectedAccount() is used in lots of places. Most of them without checking the return value. In some cases, the currently selected tab is not related to any account (widget.Terminal for example). This can lead to unexpected crashes when accessing account specific configuration. When possible, return an error when no account is currently selected. If no error can be returned, fallback to non-account specific configuration. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Koni Marti <koni.marti@gmail.com>
* postpone: re-open review mode on errorKoni Marti2022-02-061-4/+9
| | | | | | | | | re-opens the review UI when the postpone operation fails. Before, the composer would close, even on error, and we would lose the email draft. Now, the user can decide on how to proceed when postponing fails. References: https://lists.sr.ht/~rjarry/aerc-devel/patches/28824 Signed-off-by: Koni Marti <koni.marti@gmail.com>
* pgp: PGP/MIME encryption for outgoing emailsKoni Marti2022-01-071-0/+44
| | | | | | | | | | | | | | | | | | | | | implements PGP/MIME encryption with go-pgpmail. The Encrypt() function of go-pgpmail requires a list of public keys which are taken from the keystore. The keystore is searched for the email addresses of all recipients (to, cc, and bcc). If you want to be able to read the encrypted email afterwards, add yourself as a recipient in either to, cc, or bcc as well. Public keys can be exported from gpg into aerc as follows: $ gpg --export >> ~/.local/share/aerc/keyring.asc When composing a message, the encryption is enabled with the ":encrypt" command. This sets a bool flag in the Composer struct. A reapted application of this command will toggle the flag. The encrypted message can also be signed by using the ":sign" command before or after ":encrypt". References: https://todo.sr.ht/~rjarry/aerc/6 Signed-off-by: Koni Marti <koni.marti@gmail.com>
* pgp: PGP/MIME signing for outgoing emailsKoni Marti2022-01-071-0/+44
| | | | | | | | | | | | | | | | | implements PGP/MIME signing with go-pgpmail. The Sign() function of go-pgpmail requires a private (signing) key. The signing key which matches the senders email address (from field in email header) is looked up in aerc's copy of the keyring. Private keys can be exported from gpg into aerc as follows: $ gpg --export-secret-keys >> ~/.local/share/aerc/keyring.asc A message is signed with the ":sign" command. The sign command sets a bool flag in the Composer struct. Using the command repeatedly will toggle the flag. References: https://todo.sr.ht/~rjarry/aerc/6 Signed-off-by: Koni Marti <koni.marti@gmail.com>
* go.mod: change base git urlRobin Jarry2021-11-0510-17/+17
| | | | | | | I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
* send: fix missing error returnReto Brunner2021-02-281-0/+4
|
* send: fix crash if invalid password is givenReto Brunner2021-02-051-1/+2
|
* Get rid of the aerc.PushError(" " + $string) idiomReto Brunner2021-01-302-4/+4
| | | | The individual callers should not be responsible for padding
* send: don't block the UI thread during the sendingReto Brunner2021-01-241-35/+34
|
* Refactor send commandReto Brunner2020-11-211-201/+304
|
* allow the loading of existing headersReto Brunner2020-11-141-2/+4
|
* format: remove parse methods, use the one from go-messageReto Brunner2020-11-141-2/+1
|
* compose: use a proper header instead of a string mapReto Brunner2020-11-143-9/+32
| | | | | | | | | | | | | Prior to this commit, the composer was based on a map[string]string. While this approach was very versatile, it lead to a constant encoding / decoding of addresses and other headers. This commit switches to a different model, where the composer is based on a header. Commands which want to interact with it can simply set some defaults they would like to have. Users can overwrite them however they like. In order to get access to the functions generating / getting the msgid go-message was upgraded.
* propagate error from sendmaily0ast2020-09-221-2/+9
|
* Add `oauthbearer` support for SMTPR Chowdhury2020-08-131-0/+31
| | | | | | | | | This piggybacks on the existing IMAP support, and uses the same configuration format (my local testing example has the IMAP and SMTP lines almost copy-pasted from one another). It's a little clumsy in that a new token is negotiated for every `Send()` command, but it's a start...
* Implement style configuration.Kalyan Sriram2020-08-062-8/+2
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Revert "Implement style configuration."Reto Brunner2020-07-302-2/+8
| | | | This reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
* Implement style configuration.Kalyan Sriram2020-07-302-8/+2
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Use PushStatus instead of SetStatus where it makes senseHeiko Carrasco2020-07-091-3/+1
|
* Revert "Add Style configuration"Drew DeVault2020-05-284-10/+16
| | | | This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
* Revert "Remove duration from the status methods"Drew DeVault2020-05-284-14/+16
| | | | This reverts commit f06d683688e3d2139b14f67b7e349089e7200bf4.
* Remove duration from the status methodsReto Brunner2020-05-274-16/+14
| | | | We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
* Add Style configurationReto Brunner2020-05-274-16/+10
| | | | | | | | | | The following functionalities are added to configure aerc ui styles. - Read stylesets from file with very basic fnmatch wildcard matching - Add default styleset - Support different stylesets as part of UiConfig allowing contextual styles. - Move widgets/ui elements to use the stylesets. - Add configuration manual for the styleset
* Set AnsweredFlag on successful replySrivathsan Murali2020-05-251-0/+2
|
* gofmtDrew DeVault2020-05-191-1/+1
|
* Show 'Message sent' only for ten seconds instead of permanentlyelumbella2020-05-111-4/+4
|
* Implement :header commandRay Ganardi2020-05-011-0/+74
| | | | | | Usage: *header* [-f] <field> [value] Add a new email header. If the header already exists, -f must be specified to replace the given value.
* gofmt fixesDrew DeVault2020-04-241-1/+1
|
* Add recall commandJeffas2020-04-241-2/+2
| | | | | | This command allows recalling the selected postponed email to edit in the composer. The command only allows recalling from the postpone directory.
* Add postpone commandJeffas2020-04-241-0/+119
| | | | | | | This command uses the Postpone folder from the account config to save messages to. Messages are saved as though they were sent so have a valid 'to' recipient address and should be able to be read back in for later editing.
* Use aerc.PushError where appropriateBen Fiedler2020-04-231-2/+1
| | | | Forgot an unused import, to save you the hassle here is v2.
* Update dependenciesSimon Ser2020-03-031-1/+1
| | | | This brings in some bug fixes.
* Mark sent messages as "seen" in maildirGalen Abell2020-03-031-2/+2
| | | | | | | - Add maildir flags to complement a messages imap flags - Set the "seen" flag on sent messages when using the maildir backend - Cleanup AppendMessage interface to use models.Flag for both IMAP and maildir
* Add support for AUTH LOGIN submissionLuke Drummond2019-11-011-0/+3
| | | | | | | | | | | `go-sasl` upstream added support [1] for the obsolete [2] AUTH LOGIN method which enables aerc to send email via servers which remain common in the wild. Fixes ~sircmpwn/aerc2#263 [1] https://github.com/emersion/go-sasl/commit/61afe53d [2] https://datatracker.ietf.org/doc/draft-murchison-sasl-login/
* Make commands join args with spacesJeffas2019-09-202-14/+7
| | | | | | | | | | | | | | | This patch ensures the following commands join their arguments with spaces to make it easier to interact with: - cf - mkdir - cd - attach - detach - ct - copy - move - save
* all: use fmt.Errorf for fomartting errorsWagner Riffel2019-09-041-2/+1
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* all: purge redundant underscoresWagner Riffel2019-09-047-21/+21
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* Revert "add close command at global level"Drew DeVault2019-08-131-0/+33
| | | | This reverts commit f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0.
* add close command at global levelAditya Srivastava2019-08-131-33/+0
|
* Allow cc/bcc command to receive no argumentsDaniel Bridges2019-08-071-4/+3
|
* cc/bcc: Append to existing headers if called twiceKevin Kuehler2019-08-071-2/+2
| | | | Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Add cc and bcc commandsDaniel Bridges2019-08-031-0/+39
|
* Add filesystem completions for :attach and :cdGalen Abell2019-08-021-1/+7
| | | | | Tab-completions now cycle through filesystem paths when using :attach or :cd commands.
* Sendmail: allow for arbitrary parametersReto Brunner2019-07-291-1/+11
| | | | Allows the outgoing command to contain arguments and flags
* Add :detach commandGalen Abell2019-07-271-0/+55
| | | | | | | Add a command for removing attachments from a composed message. Syntax is :detach [path], with path being an optional argument specifying the path of one existing attachment. If no path is specified, the first attachment is removed.
* Add missing fallthroughDrew DeVault2019-07-271-0/+2
|
* Implement sendmail supportDrew DeVault2019-07-271-10/+36
|